Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with loading an excel file data to database

 
raghu tammina
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm loading an excel file into database(used poi-3.9 jar).it has Text(tab delimited) format. while loading it is showing an exception in console i.e,

" Invalid header signature; read 0x096F6E5F74726170, expected 0xE11AB1A1E011CFD0" what it means?how to solve this format issue?

if i'm trying to save that file after some changes to be done then it is displaying an alert pop up.please find the attachment.
Untitled.png
[Thumbnail for Untitled.png]
 
Sresh Rangi
Ranch Hand
Posts: 52
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excel files begin with 0xE11AB1A1E011CFD0 but the file you're using is a tab separated file which POI can't read. You need to either use a different library like opencsv, or save in the excel format (xls/xlsx).
 
Amir Keibi
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although this is a Java forum, I'm not going to assume that you aren't open to other options. Especially because there isn't anything in your question about using only Java.

When it comes to Microsoft Office, I'd recommend using Microsoft technology. VSTO provides native support for reading Excel documents. You could use VSTO with C# to read the Excel file and Oracle native driver for .NET (ODP.NET) to update the database.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amir Keibi wrote:Although this is a Java forum, I'm not going to assume that you aren't open to other options. Especially because there isn't anything in your question about using only Java.

A questionable non-assumption, given that this is the JavaEE forum, so we're presumably talking about a server-side issue. Assuming that I might be open (or even be able) to using Microsoft technology on a server that is otherwise used to run JEE (and thus is likely Linux) is quite a leap.
 
Amir Keibi
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you say so. For the record: http://www.mono-project.com/Main_Page
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do say so. And if you're seriously suggesting Mono I'll point out that in my experience that is even less likely to be used on a production system than Windows.
 
Amir Keibi
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How many questions are posted throughout this website just because remotely are related to Java?
As for Mono not being used in production, that's just not a valid statement:

http://www.mono-project.com/Companies_Using_Mono

I'm not an advocate of any technology. I just think that a right tool should be used for the job.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nobody said it wasn't used in production.
 
Amir Keibi
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry. That's how it sounded to me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic