When the line workSheet.Cols = 10 is executed I get
 
System.NullReferenceException was unhandled
  Message=Object reference not set to an instance of an object.
  Source=Google.GData.Spreadsheets
  StackTrace:
       at Google.GData.Spreadsheets.WorksheetEntry.set_Cols(UInt32 value)
 
 
The error indicates that the object workSheet.Cols was not instantiated
Any ideas how I can solve this .... Thanks
 
Marco
 
 
 

On Wednesday, 16 May 2012 20:49:10 UTC+2, Claudio Cherubino wrote:

> Hi Marco,
>
> What is the error you get?
> Thanks
>
> Claudio
>
> On Wed, May 16, 2012 at 11:47 AM, Marco Desira <[email protected]>wrote:
>
>> Adding a worksheet to a spreadsheet using .Net triggers an error.
>> The error is triggered when setting the number of rows and cols of the 
>> worksheet.
>>  
>> It seems that there is a bug in the API
>>  
>> The code is found at
>>  
>> https://developers.google.com/google-apps/spreadsheets/#adding_a_worksheet
>>  
>> Refer to the code below. Setting the cols and rows trigegrs the error.
>>
>> WorksheetEntry worksheet = new WorksheetEntry();
>>  worksheet.Title.Text = "New Worksheet";
>>  worksheet.Cols = 10;
>> worksheet.Rows = 20;
>>  
>>  
>> Any ideas for a work around?
>>  
>> Thanks
>>
>>  
>>
>>  
>>
>
>

Reply via email to