PDA

View Full Version : extract excell data to csv file


formula_2002
05-30-2013, 01:34 PM
I probably have a few thousands races in excell format.
I need to extract the data from specific cells and convert them into a csv file format.
Excell seems to only convert the entire sheet into the format, but that would cause a bit of a problem for me. I just want the data in the targeted cell.

Any help to accomplish this would be appreciated.

Thanks

DeltaLover
05-30-2013, 02:14 PM
You need to write a utitility to read the xls, locate the fields you need and write them to csv format.

For this you have various choices. If you are using .NET check this:

http://stackoverflow.com/questions/15828/reading-excel-files-from-c-sharp

I suggest using python though. Check this link:


http://www.simplistix.co.uk/presentations/python-excel.pdf

if you need more help, let me know...

Dave Schwartz
05-30-2013, 02:53 PM
... or, to do it manually:

1. Build a spreadsheet with the data formatted the way you want it to look. (This will become your CSV file.)

2. Open your race spreadsheet workbook and build a new sheet that looks like the one in #1.

3. Create formulas in the new worksheet to reference the cells in the original race worksheet in order to populate the data.

4. Once the data is populate, do a COPY and PASTE AS VALUES into the CSV worksheet.

5. Open a new race worksheet and paste the contents into the worksheet ref'd in step 2.

6. Repeat steps 4 & 5 until your data is all in the CSV sheet..

Note that a macro could be written to perform steps 4 & 5.

hcap
05-30-2013, 02:56 PM
I probably have a few thousands races in excell format.
I need to extract the data from specific cells and convert them into a csv file format.
Excell seems to only convert the entire sheet into the format, but that would cause a bit of a problem for me. I just want the data in the targeted cell.

Any help to accomplish this would be appreciated.

ThanksI would re-arrange and consolidate the data that you need into a tabular format and copy it over to another workbook and save that as a CSV. Either manually or write some vba to do it. Of course you could copy multiple excel sheets and ranges

**oops Dave pretty much beat ne to it

formula_2002
05-30-2013, 06:20 PM
You need to write a utitility to read the xls, locate the fields you need and write them to csv format.

For this you have various choices. If you are using .NET check this:

http://stackoverflow.com/questions/15828/reading-excel-files-from-c-sharp

I suggest using python though. Check this link:


http://www.simplistix.co.uk/presentations/python-excel.pdf

if you need more help, let me know...


this is the direction I need to go with..now I need get it into my head,


I've have a good handel on WinTask, but last I checked, it would not accomplish what I need
thanks to all

Ray2000
05-30-2013, 06:33 PM
A shortcut if...
All the cells you don't want are in the same row and/or same column, then hide those rows (columns) and

Select the whole sheet
Use "GOTO Special" in... Home-->Find--GOTO Special and click on Select Visible cells only

Copy and paste into a new workbook and Save as a csv format.

but that may be a big "If" :)

JJMartin
06-01-2013, 06:11 PM
If the columns or rows that you need the data from are always the same, I could write a macro for that, let me know.

formula_2002
06-02-2013, 10:12 AM
If the columns or rows that you need the data from are always the same, I could write a macro for that, let me know.

Thanks for the offer.
s89:v89 down through s104:v104
v178:am178 down through v195:am195