473,385 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

coping with empty excel cells in the xml document

Hi
I have an xml document that has been created from an excel spreadsheet. In
the s/s there are some empty cells however these are not captured in the xml
file. All that is added is for the cell after where the empty cell should
be, it has an extra attribute: "ss:Index="6", where it is the 6th cell in
the row, and cell 5 had no entry.

I'm wanting to pick out a particular cell from a particular column however
just iterating through the cells is going to give me invalid values where
there should have been empty cells.

Does anyone know how to handle this?

I've tried checking to see if there are attributes, and if there are if the
name is "ss:Index" and comparing the value of this attribute to a loop
counter i've created however this is very fiddly and long winded.

Thanks
Wend

Nov 12 '05 #1
2 3761
connect to excel by ado.net, then export to xml from dataset

regards
daniel #

"Wendy Spray" <sp*****@lincoln.ac.nz> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi
I have an xml document that has been created from an excel spreadsheet. In the s/s there are some empty cells however these are not captured in the xml file. All that is added is for the cell after where the empty cell should
be, it has an extra attribute: "ss:Index="6", where it is the 6th cell in
the row, and cell 5 had no entry.

I'm wanting to pick out a particular cell from a particular column however
just iterating through the cells is going to give me invalid values where
there should have been empty cells.

Does anyone know how to handle this?

I've tried checking to see if there are attributes, and if there are if the name is "ss:Index" and comparing the value of this attribute to a loop
counter i've created however this is very fiddly and long winded.

Thanks
Wend

Nov 12 '05 #2
Thanks Daniel.
I created the dataset and viewed it in a datagrid and all the null cells
were there fine.
I then saved it to xml using the WriteXml command. The resulting xml file
though doesn't have the extra empty nodes in it. All that is different is
the tags have changed from "Data" to the actual heading for the column.
Am I missing something or is this as good as it gets?

Wend

"Daniel Sharp" <da****@sharp.com> wrote in message
news:Ox**************@TK2MSFTNGP09.phx.gbl...
connect to excel by ado.net, then export to xml from dataset

regards
daniel #

"Wendy Spray" <sp*****@lincoln.ac.nz> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi
I have an xml document that has been created from an excel spreadsheet.

In
the s/s there are some empty cells however these are not captured in the

xml
file. All that is added is for the cell after where the empty cell should be, it has an extra attribute: "ss:Index="6", where it is the 6th cell in the row, and cell 5 had no entry.

I'm wanting to pick out a particular cell from a particular column however just iterating through the cells is going to give me invalid values where there should have been empty cells.

Does anyone know how to handle this?

I've tried checking to see if there are attributes, and if there are if

the
name is "ss:Index" and comparing the value of this attribute to a loop
counter i've created however this is very fiddly and long winded.

Thanks
Wend


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wendy Spray | last post by:
Hi I have an xml document that has been created from an excel spreadsheet. In the s/s there are some empty cells however these are not captured in the xml file. All that is added is for the cell...
0
by: Carlos Lozano | last post by:
Hi, I have an application that creates Excel files and I ma having trouble formatting cells. I fill all cells required, sewt fonts and everything, but have a cell that contains multiple text...
2
by: Chris Bellini | last post by:
Greetings! I'm developing a C# application that needs to read some data from a selected XLS file. I've used VB in the past to automate Excel but this is the first time I've used C#. Back in VB,...
0
by: Said | last post by:
hello, how can i open word, excel, pp document witout the standard commandbar so that the user couldn't use the options "save, save as, ctrl+F and ctrl+S,...". thanks for a quick answer.
3
by: Mike Fellows | last post by:
i have some code that pulls a large amount of data from a database and puts it into an excel spreadsheet, some excel formulas are inserted and the whole lot gets printed out (excel in invisble...
0
by: maccer | last post by:
i need to create some form of macro that will read the information from excel cells and then put them all together in a text box. it is very important that the formating remains consistant between...
1
by: tito | last post by:
Hi All, I am trying to write a code which will convert the Excel sheet document to Pie Diagarm using Perl Script.I have already searched in CPAN which gives the details of...
1
by: thadson | last post by:
Hi, I'm trying to import specific cells from MS Excel 2000 spreadsheets to MS Access 2000 tables then move the spreadsheets to a different directory. I'm very new to this and I'm having trouble...
0
by: gggram2000 | last post by:
Hi there, I'm using microsoft visual studio 2005, with c# code. I recently downloaded GemBox which is a spreadsheet for excel. I can pass parameters through textboxes, comboboxes, labels...etc...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.