Recent

Author Topic: Direct access to cells in Open Office Calc SpreadSheet  (Read 2818 times)

MortenB

  • Jr. Member
  • **
  • Posts: 59
Direct access to cells in Open Office Calc SpreadSheet
« on: October 13, 2015, 09:06:11 am »
I use Lazarus IDE 1.2.4 and would like to be able to access cells in specific Open Office SpreadSheets.
My first aim is to read and identify tabs, colors, bold/italic/normal, font, size and the actual text of course, where the text is most important. The color of the cell is second important. The actual formatting of the text is useful but not that important.
My second goal is to update /change or rewrite certain cells with new or changed information.

Are there any easy methods for doing this?
like:
Code: Pascal  [Select][+][-]
  1. VAR
  2.   MaxTab : BYTE;
  3.   MyString : Ansistring;
  4. BEGIN
  5.   MaxTab := OOSheetsMax; // To get the count of the sheets in the active document.
  6.   OOSheetActive := 1; // To set the first sheet active
  7.   MyString := OOCell[1,1]; // To read the text only in this cell.
  8.   OOCell[2,1].AsAnsiString := IntToStr(Length(MyString)); // Just to add information to the sheet as text.
  9.   OOCell[3,1].AsInteger := Length(MyString); // Just to add information as a number.
  10.  ...
  11.  

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Direct access to cells in Open Office Calc SpreadSheet
« Reply #1 on: October 13, 2015, 10:58:38 am »

 

TinyPortal © 2005-2018