read CSV file and create XLSX file with certain formatting

excelactuary

New Member
Joined
Feb 18, 2013
Messages
45
Hello,

I am look for options how to read a CSV file with a certain structure (see attachment: csv_input.csv) and create a XLSX file from the data in the CSV with a specific formatting (see attachment: result_output.xlsx).

https://drive.google.com/open?id=1XkMBWZQarR3Z9zTPU2VgJ0Z_PS7qNIon

https://drive.google.com/open?id=149VD-NQgQGsVCSvO7d1RtTbFz3iu6vuw

I'm having different CSV files which will always have the same number of columns, but a different number of rows, so I would want something which considers this. Also, the CSV file has some redundant data in the beginning, which I do not want in the result file. I only want to transfer the data starting from "Datum".

Some columns have a non-standard formatting (number or percentage - see result_output.xlsx) and special formatting (first row is bold and underlined and there is a line over the last row). Is it possible to include this in the code?

I know that this can be normally done with the text import wizzard. The problem is that I have to make the whole process (much) easier because the userbase consists of people who are seldom using excel and are also older. That's why I was thinking of an automated VBA solution, where you can start the code through a button. Ideally, the user has to punch just one a button which opens a "Open file"-menu and then VBA takes care of the data transfer and formatting.

Thank you very much for your help.

Edit: I've cross-posted this topic here as well:

https://www.excelforum.com/excel-pr...file-with-certain-formatting.html#post5112576

https://www.ozgrid.com/forum/forum/...-and-create-xlsx-file-with-certain-formatting
 
Last edited:

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top