Error: Invalid Column Index

I cannot determine the cause of an exception which is occuring during report generation. I am looking for any suggestions toward narrowing down the issue. I've tried executing the report on a nearly empty template where only Names are defined, but includes empty worksheets and the #Config sheet without any expressions. I am providing all data tables and report variables.  The exception message is:

 
Invalid column index: "0"
 
The exception type is:  FlexCelCoreException
 
Here is the stack trace:
 
   at FlexCel.Core.FlxMessages.ThrowException(FlxErr ResName, Object[] args)
   at FlexCel.XlsAdapter.XlsFile.#Xrb(Int32 , Int32 )
   at FlexCel.XlsAdapter.XlsFile.KeepColsTogether(Int32 col1, Int32 col2, Int32 level, Boolean replaceLowerLevels)
   at FlexCel.Core.ExcelFile.ClearKeepRowsAndColsTogether()
   at FlexCel.Report.FlexCelReport.#EFb(List1 , List1 )
   at FlexCel.Report.FlexCelReport.#CFb(Int32 , #Ce , #ye& , List1 , List1 )
   at FlexCel.Report.FlexCelReport.Run(ExcelFile aWorkbook)
   at FlexCel.Report.FlexCelReport.Run(Stream templateStream, Stream outStream)
   at BAML.CompassUIControls.Utils.ExportReportUtil.RunReport(FlexCelReport report, Stream templateStream, String saveFilePath) in C:\TFSRoot\Architecture and Strategy\BAML.CompassDesktop\BAML.CompassUIControls\Utils\ExportReportUtil.cs:line 75
 
Any troubleshooting suggestions would be appreciated.
 
Thanks

Hi,


It is a little hard to diagnose with only this data, but I guess this could be happening if you have a completely empty sheet. Could this be the case? If there is an empty sheet, can you try removing it or writing something on it?

I think this should be fixed in FlexCel 6 (which we are about to release, but there is always something else delaying it). But I would be interested in knowing if this is caused by an empty sheet, so I can be more confident that it was fixed.

Adrian,

 
All sheets are populated with at least one tag. The closest I have to an empty sheet is a worksheet with a picture. This picture is assigned a tag via a declared Name. In other words, when you select the picture you will see a user defined tag in the Name box. This sheet's purpose is to display an image provided via a user defined report variable.
 
There are two other sheets. One is a very straight-forward table and the third is built somewhat dynamically via <#Table.**> and <#Table.*> tags. I had mentioned the empty worksheets in my original post, because I was describing troubleshooting steps I had taken in an attempt to narrow the issue. I wanted to see if the error would persist despite empty worksheets.
 
What other information can I provide? Do you have any recommended troubleshooting steps?
 
Thanks

a sheet with a picture would count as "empty" for this test. Can you try removing that sheet? (or entering something in a cell in the sheet)

Adrian,

 
Thank you for suggesting to remove the sheet. This makes me very happy to know the cause.
 
I decided to create this worksheet with a picture, because the image is of a stacked bar chart. I've learned from another forum post that I cannot have XL create a chart whose series width is unknown at design time, i.e. the number of columns of the data series is not fixed. I've decided to work around the issue by including another tag in the sheet.
 
Thank you for your help and troubleshooting suggestions. This is very much appreciated.
 
Regards,
Bryan