Hi~I used a Microsoft Office Open XML SDK 2.0 to make a Excel File.And I tried to export a Grid to the Excel file.But ArgumentOutOfRangeException was occurred.The exception message is "Index was out of range. It must be non-negative and less than the size of the collection".It may be Target of Relationship.The Target' value is "/xl/worksheets/sheet.xml".Is it right?please help me. What should I do?thanks~~
p.s : I was called UltraGridExcelExporter.Export() method to export a grid data.
There's not much information here to go on. The sample you attached here appears to be an ASP.Net application. So are you exported a WebGrid to the xlsx file?
Also, I don't see any xlsx files in your sample. Are you trying to export the grid into an XML file? I don't believe that will work.
I am sorry for my delayed answer.
I use a WinGrid. And I exported a WinGrid to a Excel.
You can find a excel file, if you remove a Zip extension from the attached file(sample.xlsx.zip).
"Sample.xlsx" is a excel file. It's a Office 2007 format.
thank you~