You've already forked lazarus-ccr
fpspreadsheet: Improves OpenDocument support and rows/cols are now 1-based
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@686 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -38,8 +38,8 @@
|
||||
<Filename Value="excel2read.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="excel2read"/>
|
||||
<CursorPos X="1" Y="42"/>
|
||||
<TopLine Value="24"/>
|
||||
<CursorPos X="3" Y="37"/>
|
||||
<TopLine Value="25"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="309"/>
|
||||
<Loaded Value="True"/>
|
||||
|
@ -38,7 +38,7 @@
|
||||
<Filename Value="excel2write.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="excel2write"/>
|
||||
<CursorPos X="24" Y="37"/>
|
||||
<CursorPos X="21" Y="43"/>
|
||||
<TopLine Value="18"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="309"/>
|
||||
@ -116,8 +116,8 @@
|
||||
<Unit10>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<UnitName Value="fpspreadsheet"/>
|
||||
<CursorPos X="3" Y="428"/>
|
||||
<TopLine Value="420"/>
|
||||
<CursorPos X="21" Y="67"/>
|
||||
<TopLine Value="57"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="92"/>
|
||||
<Loaded Value="True"/>
|
||||
|
@ -25,16 +25,16 @@ begin
|
||||
MyWorksheet := MyWorkbook.AddWorksheet('My Worksheet');
|
||||
|
||||
// Write some number cells
|
||||
MyWorksheet.WriteNumber(0, 0, 1.0);
|
||||
MyWorksheet.WriteNumber(0, 1, 2.0);
|
||||
MyWorksheet.WriteNumber(0, 2, 3.0);
|
||||
MyWorksheet.WriteNumber(0, 3, 4.0);
|
||||
MyWorksheet.WriteNumber(1, 1, 1.0);
|
||||
MyWorksheet.WriteNumber(1, 2, 2.0);
|
||||
MyWorksheet.WriteNumber(1, 3, 3.0);
|
||||
MyWorksheet.WriteNumber(1, 4, 4.0);
|
||||
|
||||
// Write some string cells
|
||||
MyWorksheet.WriteUTF8Text(1, 0, 'First');
|
||||
MyWorksheet.WriteUTF8Text(1, 1, 'Second');
|
||||
MyWorksheet.WriteUTF8Text(1, 2, 'Third');
|
||||
MyWorksheet.WriteUTF8Text(1, 3, 'Fourth');
|
||||
MyWorksheet.WriteUTF8Text(2, 1, 'First');
|
||||
MyWorksheet.WriteUTF8Text(2, 2, 'Second');
|
||||
MyWorksheet.WriteUTF8Text(2, 3, 'Third');
|
||||
MyWorksheet.WriteUTF8Text(2, 4, 'Fourth');
|
||||
|
||||
// Save the spreadsheet to a file
|
||||
MyWorkbook.WriteToFile(MyDir + 'test' + STR_EXCEL_EXTENSION, sfExcel2);
|
||||
|
@ -28,10 +28,10 @@ begin
|
||||
MyWorksheet := MyWorkbook.AddWorksheet('My Worksheet');
|
||||
|
||||
// Write some number cells
|
||||
MyWorksheet.WriteNumber(0, 0, 1.0);
|
||||
MyWorksheet.WriteNumber(0, 1, 2.0);
|
||||
MyWorksheet.WriteNumber(0, 2, 3.0);
|
||||
MyWorksheet.WriteNumber(0, 3, 4.0);
|
||||
MyWorksheet.WriteNumber(1, 1, 1.0);
|
||||
MyWorksheet.WriteNumber(1, 2, 2.0);
|
||||
MyWorksheet.WriteNumber(1, 3, 3.0);
|
||||
MyWorksheet.WriteNumber(1, 4, 4.0);
|
||||
|
||||
{ Uncommend this to test large XLS files
|
||||
for i := 2 to 20 do
|
||||
@ -47,22 +47,22 @@ begin
|
||||
// or, in RPN: A1, B1, +
|
||||
SetLength(MyFormula, 3);
|
||||
MyFormula[0].TokenID := INT_EXCEL_TOKEN_TREFV; {A1}
|
||||
MyFormula[0].Col := 0;
|
||||
MyFormula[0].Row := 0;
|
||||
MyFormula[0].Col := 1;
|
||||
MyFormula[0].Row := 1;
|
||||
MyFormula[1].TokenID := INT_EXCEL_TOKEN_TREFV; {B1}
|
||||
MyFormula[1].Col := 1;
|
||||
MyFormula[1].Row := 0;
|
||||
MyFormula[1].Col := 2;
|
||||
MyFormula[1].Row := 1;
|
||||
MyFormula[2].TokenID := INT_EXCEL_TOKEN_TADD; {+}
|
||||
MyWorksheet.WriteRPNFormula(0, 4, MyFormula);
|
||||
MyWorksheet.WriteRPNFormula(1, 5, MyFormula);
|
||||
|
||||
// Creates a new worksheet
|
||||
MyWorksheet := MyWorkbook.AddWorksheet('My Worksheet 2');
|
||||
|
||||
// Write some string cells
|
||||
MyWorksheet.WriteUTF8Text(0, 0, 'First');
|
||||
MyWorksheet.WriteUTF8Text(0, 1, 'Second');
|
||||
MyWorksheet.WriteUTF8Text(0, 2, 'Third');
|
||||
MyWorksheet.WriteUTF8Text(0, 3, 'Fourth');
|
||||
MyWorksheet.WriteUTF8Text(1, 1, 'First');
|
||||
MyWorksheet.WriteUTF8Text(1, 2, 'Second');
|
||||
MyWorksheet.WriteUTF8Text(1, 3, 'Third');
|
||||
MyWorksheet.WriteUTF8Text(1, 4, 'Fourth');
|
||||
|
||||
// Save the spreadsheet to a file
|
||||
MyWorkbook.WriteToFile(MyDir + 'test' + STR_EXCEL_EXTENSION, sfExcel5);
|
||||
|
@ -11,7 +11,7 @@
|
||||
<TargetFileExt Value=".exe"/>
|
||||
<Title Value="opendocwrite"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
<ActiveEditorIndexAtStart Value="1"/>
|
||||
<ActiveEditorIndexAtStart Value="3"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
@ -38,8 +38,8 @@
|
||||
<Filename Value="opendocwrite.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="opendocwrite"/>
|
||||
<CursorPos X="30" Y="37"/>
|
||||
<TopLine Value="33"/>
|
||||
<CursorPos X="33" Y="61"/>
|
||||
<TopLine Value="47"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="309"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -86,8 +86,8 @@
|
||||
<Unit6>
|
||||
<Filename Value="..\..\xlsbiff2.pas"/>
|
||||
<UnitName Value="xlsbiff2"/>
|
||||
<CursorPos X="1" Y="360"/>
|
||||
<TopLine Value="339"/>
|
||||
<CursorPos X="1" Y="16"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="139"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -116,10 +116,10 @@
|
||||
<Unit10>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<UnitName Value="fpspreadsheet"/>
|
||||
<CursorPos X="1" Y="752"/>
|
||||
<TopLine Value="737"/>
|
||||
<CursorPos X="46" Y="308"/>
|
||||
<TopLine Value="296"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="94"/>
|
||||
<UsageCount Value="95"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
@ -131,10 +131,10 @@
|
||||
<Unit12>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<UnitName Value="fpsopendocument"/>
|
||||
<CursorPos X="87" Y="394"/>
|
||||
<TopLine Value="386"/>
|
||||
<CursorPos X="9" Y="266"/>
|
||||
<TopLine Value="263"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="12"/>
|
||||
<UsageCount Value="13"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
@ -143,130 +143,130 @@
|
||||
<CursorPos X="1" Y="268"/>
|
||||
<TopLine Value="253"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="12"/>
|
||||
<UsageCount Value="13"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit13>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="386" Column="1" TopLine="372"/>
|
||||
<Caret Line="390" Column="26" TopLine="377"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="390" Column="26" TopLine="377"/>
|
||||
<Caret Line="420" Column="32" TopLine="407"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="420" Column="32" TopLine="407"/>
|
||||
<Caret Line="421" Column="14" TopLine="408"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="421" Column="14" TopLine="408"/>
|
||||
<Caret Line="460" Column="33" TopLine="440"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="460" Column="33" TopLine="440"/>
|
||||
<Caret Line="181" Column="91" TopLine="160"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="181" Column="91" TopLine="160"/>
|
||||
<Caret Line="769" Column="83" TopLine="754"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="769" Column="83" TopLine="754"/>
|
||||
<Caret Line="102" Column="15" TopLine="89"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="102" Column="15" TopLine="89"/>
|
||||
<Caret Line="103" Column="15" TopLine="90"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="103" Column="15" TopLine="90"/>
|
||||
<Caret Line="404" Column="5" TopLine="379"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="404" Column="5" TopLine="379"/>
|
||||
<Caret Line="187" Column="1" TopLine="172"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="187" Column="1" TopLine="172"/>
|
||||
<Caret Line="380" Column="17" TopLine="362"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="380" Column="17" TopLine="362"/>
|
||||
<Caret Line="412" Column="1" TopLine="404"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="412" Column="1" TopLine="404"/>
|
||||
<Caret Line="716" Column="1" TopLine="702"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="716" Column="1" TopLine="702"/>
|
||||
<Caret Line="167" Column="17" TopLine="154"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="167" Column="17" TopLine="154"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="..\..\xlsbiff2.pas"/>
|
||||
<Caret Line="69" Column="1" TopLine="57"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="opendocwrite.lpr"/>
|
||||
<Caret Line="71" Column="1" TopLine="46"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="..\..\xlsxooxml.pas"/>
|
||||
<Caret Line="48" Column="16" TopLine="35"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="105" Column="1" TopLine="80"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="105" Column="1" TopLine="80"/>
|
||||
<Caret Line="111" Column="1" TopLine="86"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="111" Column="1" TopLine="86"/>
|
||||
<Caret Line="386" Column="1" TopLine="377"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="386" Column="1" TopLine="377"/>
|
||||
<Caret Line="357" Column="1" TopLine="350"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="357" Column="1" TopLine="350"/>
|
||||
<Caret Line="304" Column="3" TopLine="294"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="304" Column="3" TopLine="294"/>
|
||||
<Caret Line="265" Column="28" TopLine="253"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="265" Column="28" TopLine="253"/>
|
||||
<Caret Line="313" Column="1" TopLine="301"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="313" Column="1" TopLine="301"/>
|
||||
<Caret Line="41" Column="45" TopLine="37"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="41" Column="45" TopLine="37"/>
|
||||
<Caret Line="355" Column="5" TopLine="331"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="355" Column="5" TopLine="331"/>
|
||||
<Caret Line="311" Column="1" TopLine="299"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="311" Column="1" TopLine="299"/>
|
||||
<Caret Line="260" Column="28" TopLine="249"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="260" Column="28" TopLine="249"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||
<Caret Line="365" Column="5" TopLine="340"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="..\..\fpsopendocument.pas"/>
|
||||
<Caret Line="290" Column="5" TopLine="265"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
|
@ -28,10 +28,10 @@ begin
|
||||
MyWorksheet := MyWorkbook.AddWorksheet('My Worksheet');
|
||||
|
||||
// Write some number cells
|
||||
MyWorksheet.WriteNumber(0, 0, 1.0);
|
||||
MyWorksheet.WriteNumber(0, 1, 2.0);
|
||||
MyWorksheet.WriteNumber(0, 2, 3.0);
|
||||
MyWorksheet.WriteNumber(0, 3, 4.0);
|
||||
MyWorksheet.WriteNumber(1, 1, 1.0);
|
||||
MyWorksheet.WriteNumber(1, 2, 2.0);
|
||||
MyWorksheet.WriteNumber(1, 3, 3.0);
|
||||
MyWorksheet.WriteNumber(1, 4, 4.0);
|
||||
|
||||
{ Uncommend this to test large XLS files
|
||||
for i := 2 to 20 do
|
||||
@ -59,10 +59,10 @@ begin
|
||||
MyWorksheet := MyWorkbook.AddWorksheet('My Worksheet 2');
|
||||
|
||||
// Write some string cells
|
||||
MyWorksheet.WriteUTF8Text(0, 0, 'First');
|
||||
MyWorksheet.WriteUTF8Text(0, 1, 'Second');
|
||||
MyWorksheet.WriteUTF8Text(0, 2, 'Third');
|
||||
MyWorksheet.WriteUTF8Text(0, 3, 'Fourth');
|
||||
MyWorksheet.WriteUTF8Text(1, 1, 'First');
|
||||
MyWorksheet.WriteUTF8Text(1, 2, 'Second');
|
||||
MyWorksheet.WriteUTF8Text(1, 3, 'Third');
|
||||
MyWorksheet.WriteUTF8Text(1, 4, 'Fourth');
|
||||
*)
|
||||
|
||||
// Save the spreadsheet to a file
|
||||
|
Reference in New Issue
Block a user