Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
developer
active.documents
automation
binary.file_format
clipboard.dde
com.add_ins
hosting.controls
internet_other
office.sdks
officedev
officedev.other
outlook.forms
outlook.vba
smarttags
vba
web.components
  
 
date: Wed, 2 Jul 2008 03:37:51 -0700 (PDT),    group: microsoft.public.office.developer.web.components        back       


OWC Spreadsheet with C#   
i do not find much documentation about OWC usage with ASP.NET C#
online.

ss = Server.CreateObject("OWC11.SpreadSheet");
sheet = ss.Sheets.Item(1);

sheet.Range("C1:""E1").NumberFormat = "mmm-yy;@";
sheet.Range("C1:""E1").HorizontalAlignment =
ss.Constants.xlHAlignLeft;
sheet.Range("A1:""E1").AutoFilter();
sheet.Columns.AutoFit();

code works fine with classic ASP.
I am trying to Implement the same in .NET with C#.
Range is not available for usage like above (Range exists as an
Interface)
Any pointers on how to go about implementing it.

Thanks in advance,
Niranjan
date: Wed, 2 Jul 2008 03:37:51 -0700 (PDT)   author:   nickless

Re: OWC Spreadsheet with C#   
nickless  wrote in news:18c38a5b-bbe5-454b-
ac74-ac55f500ab67@f36g2000hsa.googlegroups.com:

> i do not find much documentation about OWC usage with ASP.NET C#
> online.
> 
> ss = Server.CreateObject("OWC11.SpreadSheet");
> sheet = ss.Sheets.Item(1);
> 
> sheet.Range("C1:""E1").NumberFormat = "mmm-yy;@";
> sheet.Range("C1:""E1").HorizontalAlignment =
> ss.Constants.xlHAlignLeft;
> sheet.Range("A1:""E1").AutoFilter();
> sheet.Columns.AutoFit();
> 
> code works fine with classic ASP.
> I am trying to Implement the same in .NET with C#.
> Range is not available for usage like above (Range exists as an
> Interface)
> Any pointers on how to go about implementing it.
> 
> Thanks in advance,
> Niranjan
> 

I am having similar problems - but have found that Range is implemented 
using Property get_Range.
Similarly .offset is implemented as get_Offset.
With .Cells you  need to use .get_Item.

I am now trying to find out how you get / set cell values!
date: Fri, 01 Aug 2008 14:51:22 -0700   author:   unknown

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us