Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

i fill a strongly typed dataset from excel, and then i write the sourcefilename, source sheet, and rownr into the columns filename, sheetname and rownr in the dataset.

 

however excel takes takes the empty rows too into the dataset. like if the sheet has 100 active rows, but actually only the first 10 rows has values, the oledbdatadapter fill the dataset with these 100 rows and all the "cells" in the dataset in row 11-100 has (Null).

 

i have some ideas :

- before i write the filename, sheet, and rownr, i filter all the empty rows manually. i go through all rows and for each row i check the cell. if they are empty i delete them. but then i don't know anymore which row which rownr has (because there would be an empty row in the middle too)

- after i write the filename, sheetname and rownr i go through all rows and for each row i transpose it, put it in a new dataset, sort it, and see if the 4th row has a value. if no then i can delete this row.

 

does anyone has a better idea? (i'm sure there are many better ways.....)

Posted
i took a peek to w3school's xsl tutorial site, and i wonder if it would be easier if i filter the rows in xsl because i have 167 columns in this dataset i'm working on. and it seems that xsl is more likely for web purposes? i'm using dataset to work on excel sheets...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...