Domanda

I'm reading value from Excel using jdbc-odbc in java ? One of the column name start with . how to read the from that column ? Im getting error unknown column while reading..

//String filesend = resultset.getString(".file send");

Please help me..

È stato utile?

Soluzione

Did you try escaping the . ?
A good idea would be to see the name of the column using ResultSetMetaData.getColumnName(index) method.

Altri suggerimenti

May be you should use Apache POI to get connection

Here is the code:

FileInputStream myInput = new FileInputStream(inputFile);
XSSFWorkbook wb = new XSSFWorkbook(myInput);

XSSFSheet sheet = wb.getSheetAt(0);
XSSFRow row = sheet.getRow(0); 
XSSFCell cell = row.getCell(1);
cell.setCellValue(123);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top