I have a template employing SmartMarkers and so far it’s working with importing string and double data types, just not with integral types. Whenever I put a marker in the template for an integral column I get a NullReferenceException. The stack trace is below:
<br />Object reference not set to an instance of an object.<br /> at Aspose.Excel.Cell.get_StringValue()<br /> at Aspose.Excel.Cell.PutValue(Int32 intValue)<br /> at Aspose.Excel.Cell.PutValue(Object objectValue)<br /> at Aspose.Excel.Cells.ImportObjectArray(Object[] objArray, Int32 firstRow, Byte firstColumn, Boolean isVertical, Int32 skip)<br /> at Aspose.Excel.ExcelDesigner.a(Worksheet A_0, Cell A_1, Int32 A_2, Boolean A_3)<br /> at Aspose.Excel.ExcelDesigner.Process(Int32 sheetIndex, Boolean isPreserved)<br /> at Aspose.Excel.ExcelDesigner.Process(Boolean isPreserved)<br />
I’m filling a DataSet with a result from a stored procedure call to a Microsoft SQL server, its schema is below, so you can see the data types I’m importing into the designer object. I’m simply calling SetDataSource() with the DataSet object.<br /><?xml version="1.0" encoding="utf-16"?><br /><xs:schema id="NewDataSet" xmlns="" xmlns:xs="<a class="linkification-ext" href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"><br /> <xs:element name="NewDataSet" msdata:IsDataSet="true"><br /> <xs:complexType><br /> <xs:choice maxOccurs="unbounded"><br /> <xs:element name="Facilities"><br /> <xs:complexType><br /> <xs:sequence><br /> <xs:element name="DivisionID" type="xs:int" minOccurs="0" /><br /> <xs:element name="DivisionName" type="xs:string" minOccurs="0" /><br /> <xs:element name="RegionID" type="xs:int" minOccurs="0" /><br /> <xs:element name="RegionName" type="xs:string" minOccurs="0" /><br /> <xs:element name="FacilityID" type="xs:int" minOccurs="0" /><br /> <xs:element name="PercentDoneOnTime" type="xs<img src="/forums/emoticons/emotion-2.gif" alt="Big Smile" />ecimal" minOccurs="0" /><br /> <xs:element name="PercentDoneLate" type="xs<img src="/forums/emoticons/emotion-2.gif" alt="Big Smile" />ecimal" minOccurs="0" /><br /> <xs:element name="PercentSkipped" type="xs<img src="/forums/emoticons/emotion-2.gif" alt="Big Smile" />ecimal" minOccurs="0" /><br /> <xs:element name="TasksCompleted" type="xs:int" minOccurs="0" /><br /> <xs:element name="TasksCompleted2" type="xs<img src="/forums/emoticons/emotion-2.gif" alt="Big Smile" />ouble" minOccurs="0" /><br /> <xs:element name="FollowupNote" type="xs:string" minOccurs="0" /><br /> <xs:element name="FollowupID" type="xs:int" minOccurs="0" /><br /> <xs:element name="FacilityName" type="xs:string" minOccurs="0" /><br /> <xs:element name="City" type="xs:string" minOccurs="0" /><br /> <xs:element name="State" type="xs:string" minOccurs="0" /><br /> <xs:element name="Tiny" type="xs:unsignedByte" minOccurs="0" /><br /> <xs:element name="Small" type="xs:short" minOccurs="0" /><br /> <xs:element name="Big" type="xs:int" minOccurs="0" /><br /> <xs:element name="Floaty" type="xs<img src="/forums/emoticons/emotion-2.gif" alt="Big Smile" />ecimal" minOccurs="0" /><br /> <xs:element name="SuperBig" type="xs:long" minOccurs="0" /><br /> </xs:sequence><br /> </xs:complexType><br /> </xs:element><br /> <xs:element name="Totals"><br /> <xs:complexType><br /> <xs:sequence><br /> <xs:element name="PercentDoneOnTime" type="xs<img src="/forums/emoticons/emotion-2.gif" alt="Big Smile" />ecimal" minOccurs="0" /><br /> <xs:element name="PercentDoneLate" type="xs<img src="/forums/emoticons/emotion-2.gif" alt="Big Smile" />ecimal" minOccurs="0" /><br /> <xs:element name="PercentSkipped" type="xs<img src="/forums/emoticons/emotion-2.gif" alt="Big Smile" />ecimal" minOccurs="0" /><br /> <xs:element name="TasksCompleted" type="xs:int" minOccurs="0" /><br /> </xs:sequence><br /> </xs:complexType><br /> </xs:element><br /> </xs:choice><br /> </xs:complexType><br /> </xs:element><br /></xs:schema><br />
I’m trying to import the “TasksCompleted” column using “&=Facilities.TasksCompleted”. I tried using some fake columns (see “Tiny” though “SuperBig” above) but they all gave the same error. As I said before, strings and doubles import just fine, why don’t my itegers work??
My designer file, DataSet schema and data, and the detailed page error are in here: ftp://ftp8yMwxR:bhD8vKq@ftp.directsupply.com/
Thanks for your help,
David Peters