cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Incorrect data while downloading .CSV comma seperated file in web dynpro

Former Member
0 Kudos

Dear Experts,

We have invoice download Report,Getting Incorrect data while downloading .CSV comma separated file from Portal.My code is

And also attached existing download format.Issue is in result data, data is showing continuously say for example: if first row is ended in middle of the row, second row is started there itself, my requirement is it should start with next line.

Can any body suggest to correct the same.

Thanks and Regards,

M.Reddy.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member197472
Active Participant
0 Kudos

Hi,

Checked your attached file, if I open it in excel it shows well arranged data.

New line is written for new record(row).

If you are opening it in Notepad then only data will not be well aligned. It is normal behavior of notepad.

--

Regards,

Amey

Former Member
0 Kudos

Thanks Amey,

If we open with excel, then save the file. Now even try with notepad also new record starts with new line.

how we can skip the step save.

Regards,

M.Reddy.

former_member197472
Active Participant
0 Kudos

Hi,

I don't think you can change it using WDResource factory.

Instead it will be better if you use custom java code for this.(* note that you are reading from PDF file there are no line breaks detected while reading it using Java code).

You can save the file in excel format(on temp location) and read that file row by row (appending '\n') at the end and saving it to csv. After saving it to csv you can remove excel file. (This can be workaround )

--

Regards,

Amey

vijay_kumar49
Active Contributor
0 Kudos

your attached file is in .CSV formate only. PFA screen shot for your reference. what is ur exact issue.

Former Member
0 Kudos

Dear Vijay,

My issue is required file format is .csv(comma separated),

Now Iam getting .CSV format only, But thing is when we down load file & when we open file with notepad, its showing  first row is ended in middle of the row, second row is started there itself, my requirement is it should start with next line.

But when open with excel and save & close,Now even open with notepad also, its perfectly fine.

Now How would we can skip the step "open with excel and save & close "

Thanks and regards,

M.Reddy.

former_member197472
Active Participant
0 Kudos

Hi,

I think 'newline' is added in csv file.When I tried to copy last column name and first value(

Transpoter NameHIL- ) as it is from notepad and pasted this text anywhere else (e.g in wordpad, this discussion's comment box etc)

it is printed as -

Transpoter Name

HIL-

I think you can go ahead with same code and file for your further operations, as while reading this(csv) file filereader will recognize linebreak.

--

Regards,

Amey