ValueObject:=StarOffice.Bridge_GetValueObject ĬalcSheet.GetCellRangeByName('A1:A4'). SortFields:=StarOffice.Bridge_GetStruct('.TableSortField') So the whole code should be: StarOffice:=CreateOleObject('') In example that i found it is commented "you must specify which type of sequence is transmitted to SortFields property". ValueObject.Set('.TableSortField', SortFields) Calc is an easy to understand spreadsheet program that appeals to novice users and professional data miners and number crunchers alike. I had presumed that fit to width/height was the right choice, and never thought about what I had done, but it seems 'Enlarge/Reduce' at 100 is. 'In the menu 'Format : Page', the item labelled 'Scaling Factor' offers 3 choices.Newcomers find it intuitive and easy to learn professional data miners and number crunchers will appreciate the comprehensive range of advanced functions. 'When I first started building the spreadsheet that I wanted, everything worked. It is a "Value Object" and must be set like this: ValueObject:=StarOffice.Bridge_GetValueObject OpenOffice Calc is the spreadsheet program you've always wanted. The answer is: SortFields is not just a variants array. Hope this topic on SO will be googled a way more easily by people who stumbled into this issue. SortDescriptor:=StarOffice.Bridge_GetStruct('.PropertyValue') ĬalcSheet.GetCellRangeByName('A1:A4').Sort(SortDescriptor) Īs usual, solution came shortly after exposing the problem to the world :-) I've found an example from the depths of Internet. SortDescriptor:=VarArra圜reate(, varVariant) SortFields:=StarOffice.Bridge_GetStruct('.SortField') SOCalc:=SODesktop.LoadComponentFromURL('private:factory/scalc', '_blank', 0, VarArra圜reate(, varVariant)) ĬalcSheet.GetCellByPosition(0, 0).SetValue(2) ĬalcSheet.GetCellByPosition(0, 1).SetValue(1) ĬalcSheet.GetCellByPosition(0, 2).SetValue(4) ĬalcSheet.GetCellByPosition(0, 3).SetValue(3) (For those who havent heard about OpenOffice before, its a popular. SODesktop:=StarOffice.CreateInstance('.Desktop') Some of them are for general use while some are only meant for Writer, Calc or Impress. ![]() System.SysUtils, Variants, ComObj, ActiveX Minimal reproducible example: program OpenOfficeCalcSortingIssue Os novos utilizadores acham-no intuitivo e fcil de aprender utilizadores profissionais e manipuladores de nmeros vo apreciar o extenso conjunto de funes avanadas. Newcomers find it intuitive and easy to learn professional data miners and number crunchers will appreciate the comprehensive range of advanced functions. OpenOffice Calc is the spreadsheet program you've always wanted. I tried to follow the examples in basic (from " Macros Explained"*) or C#, but still no result. Apache OpenOffice Calc A folha de clculo multiusos O Calc o programa de folha de clculo que sempre desejou. Calc is a powerful spreadsheet program similar to Microsoft Excel, with a roughly equivalent range of features. I've spent several hours trying to sort data in OpenOffice Calc in Delphi.
0 Comments
Leave a Reply. |