473,387 Members | 1,463 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,387 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 3762
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: 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:
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.