Excel to pdf - .csv format issue

Hello :slight_smile:

I am struggling currently with a piece of automation - namely, I have downloaded package ExcelToPdfConversionActivities 1.1.7 and used the Excel to PDF activity on my .csv files. However, my preferred viewing of the .csv files is automatically text-to-columned, rather than comma-separated in one column. The problem with that is that columns are fixed width, and pdf that is generated shows some values as “#####”. I already tried automating steps with Auto-fit, made a macro for that, nothing helps - seems like .csv cannot remember the formatting and every time it gives me the same-width columns in generated pdf. Any idea how to fix that?

1 Like

Anyone ? :slight_smile:

@Palaniyappan @sandeep13 @lakshman

5 Likes

Hi
did we try converting that csv file to a excel and then try converting to a pdf
@salladinne

1 Like

I think when you expand column width manually after automation,value displayed correctly
or you can try @Palaniyappan suggestion

Hi,

@Palaniyappan after saving it as xlsx (write csv/save workbook activities, etc… with extension changed from csv to xlsx) it goes smoothly, but the file is unopenable after the process.

@sandeep13 the goal is that for audit reason, the file needs to remain untouched manually - every transition until the pdf format must be within automation scope

Hi
May I know how is the data read after converting to excel from csv

Once after converting we can read that data from excel with read range activity and get the datatable which can be written first to a word document and then convert that to a pdf
For that install uipath.word package and then use word application scope and Insert table activity

Then use export to pdf activity

Cheers @salladinne

Thank you, I will try that
@Palaniyappan

It worked, but now the indentation looks wrong due to word width page limitation:

The initial report (csv to pdf - original problem) : consolidated_upload_20200212.pdf (81.7 KB)

The problem with the report after word activities exporting: consolidated_upload_20200212x.pdf (98.6 KB)

As you see, both options are not ideal.
Ideally, we would like to have the format of the first report, just showing values (those values are dates, they wouldn’t stretch the width of the report document to unfittable sizes - the #### are just showing because of the fixed width setting when opening each excel document on)

Thanks for help so far, can you give me any further suggestions as to how to fix this problem?