CVS to XLS in Ruby

H

haley.miller

I currently have a script that reads in a CVS file and attempts to save
it out as an XLS file. The main purpose of the script is to do
formatting. However, when I save the file to a .xls, excel shows me a
file where all my data is in the first column of each and none of my
formatting has held. I suspect this is because my file is still in
some way in CVS format. Is there a way within ruby to tell it that the
file I have opened needs to be covereted from CVS to XLS or a way to do
this when I save the file? Any help would be appreciated!

Haley
 
A

aaron.kempf

lol i'd be QUITE impressed if you find a way.

i think that excel is crap so who cares.. but still-- i woudl be QUITE
impressed with ruby if there was a somewhat easy way to do this
 
A

aaron.kempf

looks like you do something like this

require 'win32ole'
wb = WIN32OLE.connect("excel.application")
wb.SaveAs

I would open a spreadsheet; record a macro and copy and paste it from
there.

ps- this is going to require windows and excel.. .right?
 
G

greg.rb

lol i'd be QUITE impressed if you find a way.

i think that excel is crap so who cares.. but still-- i woudl be QUITE
impressed with ruby if there was a somewhat easy way to do this

excel is a fantastic functional programming application.

ruby can convert CVS through the win32ole - if you have excel. this is
how i manipulate excel.

i haven't used them but there are modules which can write directly
excel files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top