hi,
i am facing a problem while opening an xlsx file crested by code in vb.net.
can anyone help me out.?
below is the error log i am getting.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<logFileName>error027240_01.xml</logFileName>
<summary>Errors were detected in file '\\LocalMachine\New Folder\Export.xlsx'</summary>
- <additionalInfo>
<info>Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.</info>
</additionalInfo>
- <repairedRecords summary="Following is a list of repairs:">
<repairedRecord>Repaired Records: Table from /xl/tables/table1.xml part (Table)</repairedRecord>
</repairedRecords>
</recoveryLog>
------------------------------
below is the code.i have a datagrid that has 4 cols and n number of rows.(cols and rows can differ)
-----------------------------------
Dim
xDocResult.InsertBefore(xmldecl, root)
workSheet.SetAttribute(
xDocResult.AppendChild(workSheet)
workSheet.AppendChild(cols)
col.SetAttribute(
cols.AppendChild(col)
workSheet.AppendChild(sheetData)
rNode.SetAttribute(
sheetData.AppendChild(rNode)
cNode = xDocResult.CreateElement(
CSInt = 1
cNode.SetAttribute(
rNode.AppendChild(cNode)
vNode = xDocResult.CreateElement(
totalStringCount += 1
strArray.Add(hdrRow.Cells.Item(icol).Text)
CSInt = (strArray.Count - 1)
vNode.InnerText = CSInt.ToString
vNode.InnerText = strArray.IndexOf(hdrRow.Cells.Item(icol).Text).ToString
cNode.AppendChild(vNode)
icol += 1
rNode = xDocResult.CreateElement(
CSInt = (r + 1)
strArray.Add(dRow.Cells.Item(c).Text)
vNode.InnerText = (strArray.Count - 1).ToString
vNode.InnerText = strArray.IndexOf(dRow.Cells.Item(c).Text).ToString
c += 1
r += 1
tableParts.SetAttribute(
workSheet.AppendChild(tableParts)
tablePart.SetAttribute(
tableParts.AppendChild(tablePart)
---------------------------------------------------
Any help will be highly appreciable.
Thanks n Regards.
Abhishek.
i am done with the application.
now it doesnt show any error message.
No office is required on server.
All you need is office 2007 on client mahine.
and in case your client has 2003 then SP2 office 2007 is needed.
In case anybody needs any help with this, feel free to ask.
regards,