Excel issue while writing record in it

Hi Team,

The robot was not writing the record in single line. it is writing record in 2 line. How we can achieveExcel issue.xlsx (9.3 KB) Copy of Excel issue.xlsx (9.3 KB) it.

Hi @Shirish

I can understand what you are saying, can you attach a workflow.

It will help in seeing how you are fetching the data and how you are pasting it.

Thanks,
Prankur

1 Like

We are writing no of rows in notepad first and then converting these notepad into .csv and zip format. This is the client code so I can not share here. Please tell me what are the pre checks needs to done?

Hey buddy

From where are you writing the content in notepad?

Do you have any dummy data?

Thanks,
Prankur

1 Like

We are writing data from input excel file into notepad by doing some validation.

Then you will have to check the data in excel first and your validations

1 Like

Buddy may i know which activity you are using to write into note pad
@Shirish

Append Line activity we are using

@Shirish
before appending the data… make sure there is no new line character in you string value…
while writing csv file new line character is used to identify each line separately.

This is happening for only few rows, all remaining rows are written in excel properly.

can post a text file containing sample raw data…

Advice: before writing your data in notepad…
do a loop on column containing you data and remove any new line char.
like below

for each row in dt
row("value") = row("value").tostring.replace(Environment.Newline,"")
Next row

after the above loop do your next processing steps like feeding data into notepad, performing validation,writing zip etc…

Hi,

We have .txt file which contains few records . The Robot was directly converting this .txt file into .csv file by replacing the .txt with .csv.

This is the screen shot for .txt file in which “C;2;12FL05865000;DIWWC1400047;12-FL05865-001-0013;DIWWC1400047;O;20131119;20140113;ZZZZZ;13;+0.00;Forearm and multiple injury;;”

is divided in 2 rows which causing the problem. Please help me

one way I found that may help is…

before changing the extension of file
read text file into String variable str

str = str.replace(";" & Environment.newline,"^").replace(environment.newline," ").replace("^",";" & environment.newline)

write str to text file…

Hi Akshay,

I followed what you said. but now it is writing few word in another column. Please find the below screen shot. How I can write it only one single column.

can you give us sample text file

3SC_000000102_20190430.zip (480 Bytes)

give us sample with line of text with issue… (like the one you attached screenshot of)
the one you provided does not have any issue…
all of the lines are in Column A…

3SC_20190401_20190430_001.xlsx (51.3 KB)

Hey,

For few input excel file, it is generating data in 2nd column and for few input excel sheet , it is generating data in 1st column only. Ideally it should generate the data in 1st column only.

Why such happening