473,503 Members | 9,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3774
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
395
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
19857
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
46462
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
979
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
6157
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
1465
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
3220
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
5136
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
1159
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
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.