c# Programming, removing rows and sorting problems

Java, C++, C#, Delphi, ??? - Using the UNO bridges

c# Programming, removing rows and sorting problems

Postby stobi_de » Thu Jan 22, 2015 12:07 pm

Hello,
I do not know, how to delete rows or sort a sheet using c#.
I have access to the cells, but something is missing (maybe only in my head :D )

I tried this
XSpreadsheet oSheet;
XCellRange oCellRange;
oCellRange = oSheet.getCellRangeByPosition(0, i, 255, 1);
oCellRange.Delete () - this or similar is not existing !!

Thanks

frank
Libre Office 4.3 and Win 7 / 64
stobi_de
 
Posts: 1
Joined: Thu Jan 22, 2015 10:31 am

Re: c# Programming, removing rows and sorting problems

Postby karolus » Thu Jan 22, 2015 2:08 pm

Hallo

The quality of answers depends on quality of the question, not on quantity....

Karolus
AOO4, Libreoffice - 5.1 … 5.3.2.2 on Linux Mint17
User avatar
karolus
Volunteer
 
Posts: 852
Joined: Sat Jul 02, 2011 9:47 am

Re: c# Programming, removing rows and sorting problems

Postby RoryOF » Thu Jan 22, 2015 2:14 pm

Apache OpenOffice 4.1.7 on Xubuntu 18.04.4 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31240
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: c# Programming, removing rows and sorting problems

Postby MTP » Thu Jan 22, 2015 4:14 pm

If you want to actually remove the rows (and not just clear the contents), you need to obtain the Rows object from the Spreadsheet object, then
Code: Select all   Expand viewCollapse view
oRows.removeByIndex(i,j)
Where i = The index of the first row to be removed
j = number of rows to remove
OpenOffice 4.1.1 on Windows 10, HSQLDB 1.8 split database
User avatar
MTP
Volunteer
 
Posts: 1620
Joined: Mon Sep 10, 2012 7:31 pm
Location: Midwest USA


Return to External Programs

Who is online

Users browsing this forum: No registered users and 1 guest