fpspreadsheet: Rearrange most of the demos into folders "read_write" and "visual"
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4019 8e941d3f-bd1b-0410-a28a-d453659cc2b4
@ -1,5 +0,0 @@
|
|||||||
mkdir oocreated
|
|
||||||
cp -f oocreated.ods oocreated/
|
|
||||||
cd oocreated
|
|
||||||
unzip oocreated.ods
|
|
||||||
cd ..
|
|
@ -1,5 +0,0 @@
|
|||||||
mkdir test
|
|
||||||
cp -f test.ods test/
|
|
||||||
cd test
|
|
||||||
unzip test.ods
|
|
||||||
cd ..
|
|
@ -1,3 +0,0 @@
|
|||||||
cd test
|
|
||||||
zip -r test.ods *
|
|
||||||
cd ..
|
|
@ -49,8 +49,8 @@
|
|||||||
<Filename Value="csvread"/>
|
<Filename Value="csvread"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
@ -43,7 +43,6 @@
|
|||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="..\..\fpscsv.pas"/>
|
<Filename Value="..\..\fpscsv.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="fpscsv"/>
|
|
||||||
</Unit1>
|
</Unit1>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
@ -54,9 +53,8 @@
|
|||||||
<Filename Value="csvwrite"/>
|
<Filename Value="csvwrite"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
<SrcPath Value=".."/>
|
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
@ -0,0 +1,5 @@
|
|||||||
|
This demo demonstrates how to use fpspreadsheet to read and write comma-separated
|
||||||
|
files (csv).
|
||||||
|
|
||||||
|
Please run the write demo before the read demo so the required spreadsheet file
|
||||||
|
is generated.
|
@ -49,8 +49,8 @@
|
|||||||
<Filename Value="excel2read"/>
|
<Filename Value="excel2read"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
@ -49,8 +49,8 @@
|
|||||||
<Filename Value="excel2write"/>
|
<Filename Value="excel2write"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
@ -108,7 +108,7 @@ begin
|
|||||||
MyWorksheet.WriteHorAlignment(5, 1, haCenter);
|
MyWorksheet.WriteHorAlignment(5, 1, haCenter);
|
||||||
MyWorksheet.WriteHorAlignment(5, 2, haRight);
|
MyWorksheet.WriteHorAlignment(5, 2, haRight);
|
||||||
|
|
||||||
// Red font, italic
|
// Various font settings
|
||||||
MyWorksheet.WriteNumber(6, 0, 2014);
|
MyWorksheet.WriteNumber(6, 0, 2014);
|
||||||
MyWorksheet.WriteFont(6, 0, 'Calibri', 15, [fssItalic], scRed);
|
MyWorksheet.WriteFont(6, 0, 'Calibri', 15, [fssItalic], scRed);
|
||||||
MyWorksheet.WriteNumber(6, 1, 2015);
|
MyWorksheet.WriteNumber(6, 1, 2015);
|
@ -49,8 +49,8 @@
|
|||||||
<Filename Value="excel5read"/>
|
<Filename Value="excel5read"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
@ -49,8 +49,8 @@
|
|||||||
<Filename Value="excel5write"/>
|
<Filename Value="excel5write"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
@ -49,8 +49,8 @@
|
|||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
@ -43,7 +43,6 @@
|
|||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="..\..\fpstypes.pas"/>
|
<Filename Value="..\..\fpstypes.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="fpsTypes"/>
|
|
||||||
</Unit1>
|
</Unit1>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
@ -54,8 +53,8 @@
|
|||||||
<Filename Value="excel8write"/>
|
<Filename Value="excel8write"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
@ -49,8 +49,8 @@
|
|||||||
<Filename Value="ooxmlread"/>
|
<Filename Value="ooxmlread"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
@ -54,8 +54,5 @@ begin
|
|||||||
|
|
||||||
// Finalization
|
// Finalization
|
||||||
MyWorkbook.Free;
|
MyWorkbook.Free;
|
||||||
|
|
||||||
WriteLn('Finished. Press [ENTER] to close...');
|
|
||||||
ReadLn;
|
|
||||||
end.
|
end.
|
||||||
|
|
@ -49,8 +49,8 @@
|
|||||||
<Filename Value="ooxmlwrite"/>
|
<Filename Value="ooxmlwrite"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
@ -49,7 +49,7 @@
|
|||||||
<Filename Value="opendocread"/>
|
<Filename Value="opendocread"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
@ -49,8 +49,8 @@
|
|||||||
<Filename Value="opendocwrite"/>
|
<Filename Value="opendocwrite"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
@ -49,8 +49,8 @@
|
|||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
@ -49,8 +49,8 @@
|
|||||||
<Filename Value="wikitablewrite"/>
|
<Filename Value="wikitablewrite"/>
|
||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
@ -1,21 +0,0 @@
|
|||||||
program spready;
|
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
|
||||||
|
|
||||||
uses
|
|
||||||
Interfaces, // this includes the LCL widgetset
|
|
||||||
Forms, mainform, laz_fpspreadsheet_visual, sCSVParamsForm, sCtrls,
|
|
||||||
sFormatSettingsForm, sSortParamsForm, sfCurrencyForm, fpsCurrency;
|
|
||||||
|
|
||||||
{$R *.res}
|
|
||||||
|
|
||||||
begin
|
|
||||||
Application.Initialize;
|
|
||||||
Application.CreateForm(TMainFrm, MainFrm);
|
|
||||||
MainFrm.BeforeRun;
|
|
||||||
Application.CreateForm(TFormatSettingsForm, FormatSettingsForm);
|
|
||||||
Application.CreateForm(TSortParamsForm, SortParamsForm);
|
|
||||||
Application.CreateForm(TCurrencyForm, CurrencyForm);
|
|
||||||
Application.Run;
|
|
||||||
end.
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
The fpschart demo shows usage of the TsWorksheetChartSource component for
|
||||||
|
creating charts from spreadsheet data.
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
@ -85,7 +85,7 @@
|
|||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<CodeGeneration>
|
<CodeGeneration>
|
||||||
<SmartLinkUnit Value="True"/>
|
<SmartLinkUnit Value="True"/>
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
@ -66,7 +66,7 @@
|
|||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<UnitOutputDirectory Value="../../lib/$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="../../../lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Options>
|
<Options>
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
@ -81,15 +81,12 @@
|
|||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<CodeGeneration>
|
<CodeGeneration>
|
||||||
<SmartLinkUnit Value="True"/>
|
<SmartLinkUnit Value="True"/>
|
||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
|
||||||
<DebugInfoType Value="dsDwarf2Set"/>
|
|
||||||
</Debugging>
|
|
||||||
<Options>
|
<Options>
|
||||||
<Win32>
|
<Win32>
|
||||||
<GraphicApplication Value="True"/>
|
<GraphicApplication Value="True"/>
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
@ -56,8 +56,8 @@
|
|||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Options>
|
<Options>
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
@ -60,7 +60,7 @@
|
|||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Parsing>
|
<Parsing>
|
||||||
<SyntaxOptions>
|
<SyntaxOptions>
|
@ -1,7 +1,7 @@
|
|||||||
object Form1: TForm1
|
object Form1: TForm1
|
||||||
Left = 344
|
Left = 375
|
||||||
Height = 649
|
Height = 649
|
||||||
Top = 127
|
Top = 185
|
||||||
Width = 894
|
Width = 894
|
||||||
Caption = 'fpsGrid'
|
Caption = 'fpsGrid'
|
||||||
ClientHeight = 649
|
ClientHeight = 649
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
@ -83,8 +83,8 @@
|
|||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<OtherUnitFiles Value="..\.."/>
|
<OtherUnitFiles Value="..\..\.."/>
|
||||||
<UnitOutputDirectory Value="..\lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="..\..\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<CodeGeneration>
|
<CodeGeneration>
|
||||||
<SmartLinkUnit Value="True"/>
|
<SmartLinkUnit Value="True"/>
|
@ -1250,10 +1250,6 @@ begin
|
|||||||
if (ACell=nil) or (Length(ACell^.FormulaValue)=0)
|
if (ACell=nil) or (Length(ACell^.FormulaValue)=0)
|
||||||
then Strings.Add('FormulaValue=')
|
then Strings.Add('FormulaValue=')
|
||||||
else Strings.Add(Format('FormulaValue="%s"', [ACell^.FormulaValue]));
|
else Strings.Add(Format('FormulaValue="%s"', [ACell^.FormulaValue]));
|
||||||
if (ACell=nil) or (ACell^.SharedFormulaBase=nil)
|
|
||||||
then Strings.Add('SharedFormulaBase=')
|
|
||||||
else Strings.Add(Format('SharedFormulaBase=%s', [GetCellString(
|
|
||||||
ACell^.SharedFormulaBase^.Row, ACell^.SharedFormulaBase^.Col)]));
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if InspectorPageControl.ActivePage = PgSheet then
|
if InspectorPageControl.ActivePage = PgSheet then
|
||||||
@ -1349,7 +1345,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
r := GetWorksheetRow(Row);
|
r := GetWorksheetRow(Row);
|
||||||
c := GetWorksheetCol(Col);
|
c := GetWorksheetCol(Col);
|
||||||
cell := Worksheet.FindCell(row, col);
|
cell := Worksheet.FindCell(r, c);
|
||||||
hasCmnt := Worksheet.HasComment(cell);
|
hasCmnt := Worksheet.HasComment(cell);
|
||||||
end;
|
end;
|
||||||
AcCommentAdd.Enabled := not hasCmnt;
|
AcCommentAdd.Enabled := not hasCmnt;
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |