PDA

View Full Version : CSV into Excel automatically?


Nutcase
08-05-2012, 16:28
Here's one for you, and this is for my work. We have software that produces a CSV file filled with data. Out client provides an Excel file that accepts that data. Currently we're opening the CSV, copying the data, opening the Excel file, pasting the data in, and saving the Excel file as a new filename, leaving the original excel file ready for the next CSV.

Any idea how to automate the process?

The CSV file outputs to filename.csv and the excel file needs to be filename.xls

Only one CSV of data to each individual excel file.

I have brainache from trying to think of a way of doing it :( I'm no expert with excel at all, I've not used it in years!

Fankoo :)

Kitten
08-05-2012, 17:17
We used to have a similar process, iirc I wrote a Macro to do it automatically, but I'm probably missing the point!

leowyatt
08-05-2012, 20:20
Do you need to do this within excel?

Nutcase
08-05-2012, 20:28
Nope, just needs to be a file in excel format. How it is actually achieved is irrelevent.

Do you still have the macro, Kitten? Would at least give me an idea? It looks like visual basic might be able to do it but I've never used that :(

leowyatt
08-05-2012, 21:11
You could probably do it with php :) that should read CSV and created excel files

Kitten
08-05-2012, 21:30
It was a vb macro, it will be at work but can't take stuff home. Will have a look & see if I can take it & remove any bits that reference my account. Will look on Thurs when in office. Was ages ago though, I've probably forgotten how to make it work now!

Nutcase
09-05-2012, 07:20
Cool cheers :)

It's way above my head this stuff :(

kaiowas
09-05-2012, 18:30
If Kitten can't help I've done loads of this sort of thing over the years.

vix
10-05-2012, 06:01
He is very good. I email m from work with a stupid request like 'how do I make a blue thing go red' and he sends me detailed instructions back. I wrote a macro the other day *proud*

Nutcase
11-05-2012, 11:00
Cool :) well it looks like it's definitely possible! What I'll do is try and get the two files available so you can see what I mean exactly - probably be late next week sometime.

Cheers peeps :)

Kitten
15-05-2012, 12:56
Sorry dude, didn't get chance :( all the files have been archived & don't have password. Have requested access for Thursday if that's not too late! Sounds like Phil might be more help tho.

Nutcase
15-05-2012, 18:27
No problem :) Got to get some live testing of something else done but will be coming back to this soon :)