Home All Groups Group Topic Archive Search About

MS Works spreadsheet import into vb.net

Author
7 Apr 2005 11:16 PM
chris huff via .NET 247
I have a primary user who does NOT have ms Excel.  He runs MS Works and uses the spreadsheet program within it.

My vb.net application is focused around a price sheet that the user updates via their spreadsheet program and then uploads via the software, into the DB table.

I can run the upload correctly on an Excel file by creating/referencing an excel object (so I know THAT code works).  However, I can't find a namespace or anything to reference a Works spreadsheet.  I was looking for something like "Create Works.Spreadsheet" but can't find it.

My other option is have him dump it each time to a CSV file.  The problem I found with that is the spreadsheet "save as" for a csv file turns...
1/2" Something's whatever
into
"1/2"" Something''s whatever" in the CSV file.   I haven't seen a function to strip out the extra stuff.  Additionally, while this might be a possibility, the user is not savvy at all with a pc so I would like to avoid him creating csv files...unless that's the only thing to do.

--------------------------------
From: chris huff

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>mZpyeBfX9EGjKpLPpcpR8g==</Id>

Author
8 Apr 2005 4:44 AM
shriop
Tell me about it. I just had to automate pricing rate loads from excel,
roughly 100k rows, into our database using all kinds of fun stuff. I'm
not seeing any objects you can use to automate Works either, but I've
also never had to use Works luckily. If you do have to go down the
whole csv path, I sell a csv library that will handle the format you
described for you and allow you to loop over the records in the csv
file. There's also a demo version on the site if you want to try out
how it works.

http://www.geocities.com/shriop/index.html