Jump to content
We've recently updated our Privacy Statement, available here ×

.csv file windows/unix/mac format ?


Zicks

Recommended Posts

Hi,

 

I'm currently using jasperreport in a java application that export .csv files into .pdf using .jasper files.

 

I'm having a few issues with .csv file format.

If you try to open a csv file with an editor like notepad++ you can see that "End of line" characters are different whether the file is windows (EoL is 'CRLF') or unix formatted (EoL is 'LF').

 

The wierd thing is : when I use jasperreports inside my java application, csv file (windows format) won't work and jasper says "Unknown column name X" (even though 'X' is the correct field).

But unix format csv file works just fine.

 

Even wierder, when I try with iReports, it works whether the csv file are windows or linux or whatever format.

 

Is there a way to convert a file from windows to unix format with just java code, as I can't convert every csv file manually.

 

Thanks in advance.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...