We are using Excel_JDBC30.jar, and processing an excel spread sheet. One of the column headers includes the characters © (in hex, 0xC2 and 0xA9).
When we use JDBC to get the column headers for this table (via DatabaseMetaData.getColumns()), these two characters are converted to 'C'.
Is there any way to prevent this character conversion?
Thanks!
|
You have used FirstRowHasNames=true conneciton prpoerty at here? It seems that HXTT Excel is using C as default column name since your column is the 3rd column.
|
Sorry, your answer does not explain the behavior I am seeing. First of all, the © characters are a substring of the header. Instead of "Foo ©", we are getting "Foo C". Second, in our problem spreadsheet, the column with the unusual characters is column "O", the 15th, not column "C", the 3rd.
The driver is translating the characters. In our system, we have some VB programs that are getting the correct column names from the spreadsheet. When our Java program tries to look into the spreadsheet for the column found by the VB program, it is coming up empty, because the Excel_JDBC30.jar driver is changing the column names.
The best solution for us would be a way to configure the JDBC driver so that it does not change the character values.
|
Please send us that xls sample. BTW, charSet connection property maybe can hen you.
|
I am having difficulties replicating the problem, and I no longer trust my original diagnosis.
Please close this issue. If I can get a clean test case, I'll forward it to you in a new thread.
|