Hi,
We recently have purchased Excel_Core_JDBC20.jar, HXTT_Common_JDBC20.jar In order to upload 2010 Excel file in JDK 1.2. I can able to load excel successfully, But When I am trying to parse date from Excel, I am getting "Date+1 day" as value.
Example:
I am trying to upload the below record (The file should have xlsx as extension "sample.xlsx")
AccountNumber IssueDate CheckNumber Amount
0000000017 11/29/2012 300051 257200
JDBC URL = jdbc:excel:///_memory_/?versionNumber=XLSX
DRIVER CLASS = com.hxtt.sql.excel.ExcelDriver
Properties properties=new Properties();
properties.setProperty("tmpdir","_memory_");
properties.setProperty("delayedClose","-1");
properties.setProperty("firstRowHasNames","false");
I am creating database using the above code and querying to get the Excel records using below code.
sql = "Select * from "+databaseName+"."+tableName;
stmt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
rs = stmt.executeQuery(sql);
When I use rs.getString(j+1), I am getting some number. And when I use rs.getDate(j+1), I am getting 11/30/2012 (+1 day to the uploaded date).
Note: The date is working fine when I use same data in xls file, I am getting this issue when I upload an 2010 Excel formats(xlsx files).
Please suggest.
|
Failed to recur your issue. If possible, you can send your sample.xlsx . BTW, please download the latest JDBC 2.0 version, which maybe your issue have disappeared. The ltaest feature is listed at here
|
Here is the data, You can copy paste in an xlsx file and try to upload it.
AccountNumber IssueDate CheckNumber Amount
0000000017 11/29/2012 300051 257200
|
and BTW, I have downloaded the latest jar files in November
|
>Here is the data, You can copy paste in an xlsx file and try to upload it.
But in my test, 11/29/2012 will become a varchar. If I use a date format, it show normal. So I need you to send your XLSX sample.
|
ok, Please provide your email id, so that I will send my code and xlsx file to you
|
You can try support at hxtt.com
|