You've already forked lazarus-ccr
+ Expanded fpsgrid example to be able to load/save first sheet of spreadsheet files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2872 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,11 +1,10 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
|
<Version Value="9"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="7"/>
|
|
||||||
<General>
|
<General>
|
||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<TargetFileExt Value=".exe"/>
|
|
||||||
<Title Value="fpsgrid"/>
|
<Title Value="fpsgrid"/>
|
||||||
<UseXPManifest Value="True"/>
|
<UseXPManifest Value="True"/>
|
||||||
<Icon Value="0"/>
|
<Icon Value="0"/>
|
||||||
@ -14,8 +13,11 @@
|
|||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<Language Value=""/>
|
<Language Value=""/>
|
||||||
<CharSet Value=""/>
|
<CharSet Value=""/>
|
||||||
<StringTable Comments="" CompanyName="" FileDescription="" FileVersion="0.0.0.0" InternalName="" LegalCopyright="" LegalTrademarks="" OriginalFilename="" ProductName="" ProductVersion=""/>
|
<StringTable ProductVersion=""/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
|
<BuildModes Count="1">
|
||||||
|
<Item1 Name="default" Default="True"/>
|
||||||
|
</BuildModes>
|
||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
<IgnoreBinaries Value="False"/>
|
<IgnoreBinaries Value="False"/>
|
||||||
@ -36,39 +38,43 @@
|
|||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="9">
|
<Units Count="11">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="fpsgrid.lpr"/>
|
<Filename Value="fpsgrid.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="fpsgrid"/>
|
<UnitName Value="fpsgrid"/>
|
||||||
<EditorIndex Value="1"/>
|
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="16" Y="9"/>
|
<CursorPos X="16" Y="9"/>
|
||||||
<UsageCount Value="21"/>
|
<UsageCount Value="66"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="mainform.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<ComponentName Value="Form1"/>
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="mainform"/>
|
<UnitName Value="mainform"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="25"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="20" Y="38"/>
|
<CursorPos X="11" Y="12"/>
|
||||||
<UsageCount Value="21"/>
|
<UsageCount Value="66"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||||
<UnitName Value="fpspreadsheet"/>
|
<UnitName Value="fpspreadsheet"/>
|
||||||
<EditorIndex Value="2"/>
|
<IsVisibleTab Value="True"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="108"/>
|
<TopLine Value="1413"/>
|
||||||
<CursorPos X="15" Y="120"/>
|
<CursorPos X="1" Y="1428"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="31"/>
|
||||||
|
<Bookmarks Count="1">
|
||||||
|
<Item0 X="28" Y="1425" ID="1"/>
|
||||||
|
</Bookmarks>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
@ -78,187 +84,203 @@
|
|||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="129"/>
|
<TopLine Value="129"/>
|
||||||
<CursorPos X="14" Y="142"/>
|
<CursorPos X="14" Y="142"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="32"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
<Filename Value="..\..\fpolestorage.pas"/>
|
<Filename Value="..\..\fpolestorage.pas"/>
|
||||||
<UnitName Value="fpolestorage"/>
|
<UnitName Value="fpolestorage"/>
|
||||||
<EditorIndex Value="6"/>
|
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="25"/>
|
<TopLine Value="25"/>
|
||||||
<CursorPos X="4" Y="44"/>
|
<CursorPos X="4" Y="44"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="6"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit4>
|
</Unit4>
|
||||||
<Unit5>
|
<Unit5>
|
||||||
<Filename Value="..\..\..\..\..\lazarus27\fpc\2.2.4\source\packages\winunits-base\src\activex.pp"/>
|
<Filename Value="c:\lazarus27\fpc\2.2.4\source\packages\winunits-base\src\activex.pp"/>
|
||||||
<UnitName Value="ActiveX"/>
|
<UnitName Value="ActiveX"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="49"/>
|
<TopLine Value="49"/>
|
||||||
<CursorPos X="10" Y="24"/>
|
<CursorPos X="10" Y="24"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="6"/>
|
||||||
</Unit5>
|
</Unit5>
|
||||||
<Unit6>
|
<Unit6>
|
||||||
<Filename Value="..\..\..\..\..\lazarus27\fpc\2.2.4\source\packages\fcl-base\src\avl_tree.pp"/>
|
<Filename Value="c:\lazarus27\fpc\2.2.4\source\packages\fcl-base\src\avl_tree.pp"/>
|
||||||
<UnitName Value="AVL_Tree"/>
|
<UnitName Value="AVL_Tree"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="37"/>
|
<TopLine Value="37"/>
|
||||||
<CursorPos X="14" Y="83"/>
|
<CursorPos X="14" Y="83"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="6"/>
|
||||||
</Unit6>
|
</Unit6>
|
||||||
<Unit7>
|
<Unit7>
|
||||||
<Filename Value="..\..\..\..\..\lazarus\lcl\grids.pas"/>
|
<Filename Value="c:\Lazarus\lcl\grids.pas"/>
|
||||||
<UnitName Value="Grids"/>
|
<UnitName Value="Grids"/>
|
||||||
<EditorIndex Value="5"/>
|
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1517"/>
|
<TopLine Value="1516"/>
|
||||||
<CursorPos X="28" Y="1534"/>
|
<CursorPos X="28" Y="1534"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="6"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit7>
|
</Unit7>
|
||||||
<Unit8>
|
<Unit8>
|
||||||
<Filename Value="..\..\..\..\..\lazarus\lcl\include\customform.inc"/>
|
<Filename Value="c:\Lazarus\lcl\include\customform.inc"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<EditorIndex Value="3"/>
|
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="2021"/>
|
<TopLine Value="2021"/>
|
||||||
<CursorPos X="1" Y="2041"/>
|
<CursorPos X="1" Y="2041"/>
|
||||||
<SyntaxHighlighter Value="FreePascal"/>
|
<UsageCount Value="6"/>
|
||||||
|
</Unit8>
|
||||||
|
<Unit9>
|
||||||
|
<Filename Value="..\..\fpsallformats.pas"/>
|
||||||
|
<UnitName Value="fpsallformats"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<CursorPos X="62" Y="13"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Text"/>
|
</Unit9>
|
||||||
</Unit8>
|
<Unit10>
|
||||||
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
|
<UnitName Value="wikitable"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="329"/>
|
||||||
|
<CursorPos X="26" Y="339"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit10>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
<Filename Value="mainform.pas"/>
|
||||||
<Caret Line="880" Column="21" TopLine="861"/>
|
<Caret Line="84" Column="8" TopLine="73"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
<Filename Value="mainform.pas"/>
|
||||||
<Caret Line="883" Column="32" TopLine="861"/>
|
<Caret Line="10" Column="42" TopLine="1"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
<Filename Value="..\..\fpsallformats.pas"/>
|
||||||
<Caret Line="885" Column="75" TopLine="861"/>
|
<Caret Line="13" Column="62" TopLine="1"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="889" Column="20" TopLine="861"/>
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="352" Column="14" TopLine="338"/>
|
<Caret Line="417" Column="63" TopLine="399"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
<Filename Value="mainform.pas"/>
|
||||||
<Caret Line="101" Column="15" TopLine="82"/>
|
<Caret Line="10" Column="42" TopLine="1"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="34" Column="21" TopLine="12"/>
|
<Caret Line="350" Column="34" TopLine="342"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="99" Column="3" TopLine="83"/>
|
<Caret Line="323" Column="29" TopLine="313"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="352" Column="23" TopLine="333"/>
|
<Caret Line="7" Column="12" TopLine="1"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="37" Column="27" TopLine="12"/>
|
<Caret Line="131" Column="17" TopLine="113"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="36" Column="1" TopLine="12"/>
|
<Caret Line="136" Column="50" TopLine="118"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="37" Column="1" TopLine="12"/>
|
<Caret Line="138" Column="11" TopLine="120"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="38" Column="1" TopLine="12"/>
|
<Caret Line="176" Column="49" TopLine="159"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="39" Column="1" TopLine="12"/>
|
<Caret Line="178" Column="29" TopLine="161"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="..\..\fpspreadsheetgrid.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="46" Column="1" TopLine="27"/>
|
<Caret Line="182" Column="37" TopLine="165"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="..\..\fpspreadsheetgrid.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="48" Column="1" TopLine="29"/>
|
<Caret Line="205" Column="29" TopLine="188"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="38" Column="3" TopLine="12"/>
|
<Caret Line="228" Column="29" TopLine="211"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="..\..\fpspreadsheetgrid.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="48" Column="19" TopLine="35"/>
|
<Caret Line="289" Column="42" TopLine="271"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="..\..\fpspreadsheetgrid.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="15" Column="41" TopLine="4"/>
|
<Caret Line="293" Column="49" TopLine="275"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="..\..\..\..\..\lazarus\lcl\grids.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="1444" Column="33" TopLine="1425"/>
|
<Caret Line="307" Column="40" TopLine="302"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="..\..\fpspreadsheetgrid.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="25" Column="19" TopLine="4"/>
|
<Caret Line="321" Column="19" TopLine="312"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="..\..\fpspreadsheetgrid.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="17" Column="41" TopLine="7"/>
|
<Caret Line="53" Column="1" TopLine="32"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="38" Column="20" TopLine="12"/>
|
<Caret Line="88" Column="79" TopLine="75"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="..\..\fpspreadsheetgrid.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="29" Column="17" TopLine="7"/>
|
<Caret Line="411" Column="10" TopLine="407"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="..\..\fpspreadsheetgrid.pas"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="199" Column="18" TopLine="173"/>
|
<Caret Line="102" Column="19" TopLine="85"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="fpsgrid.lpr"/>
|
<Filename Value="..\..\wikitable.pas"/>
|
||||||
<Caret Line="1" Column="1" TopLine="1"/>
|
<Caret Line="108" Column="1" TopLine="104"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="fpsgrid.lpr"/>
|
<Filename Value="mainform.pas"/>
|
||||||
<Caret Line="16" Column="4" TopLine="1"/>
|
<Caret Line="10" Column="16" TopLine="1"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||||
<Caret Line="34" Column="22" TopLine="25"/>
|
<Caret Line="1425" Column="28" TopLine="1416"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="mainform.pas"/>
|
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||||
<Caret Line="38" Column="20" TopLine="25"/>
|
<Caret Line="1249" Column="3" TopLine="1240"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="..\..\fpspreadsheet.pas"/>
|
<Filename Value="..\..\fpspreadsheet.pas"/>
|
||||||
<Caret Line="120" Column="15" TopLine="108"/>
|
<Caret Line="1425" Column="28" TopLine="1413"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="8"/>
|
<Version Value="11"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)\"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
|
<Parsing>
|
||||||
|
<SyntaxOptions>
|
||||||
|
<UseAnsiStrings Value="False"/>
|
||||||
|
</SyntaxOptions>
|
||||||
|
</Parsing>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Options>
|
<Options>
|
||||||
<Win32>
|
<Win32>
|
||||||
@ -283,4 +305,5 @@
|
|||||||
</Item3>
|
</Item3>
|
||||||
</Exceptions>
|
</Exceptions>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
|
<EditorMacros Count="0"/>
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
@ -1,26 +1,60 @@
|
|||||||
object Form1: TForm1
|
object Form1: TForm1
|
||||||
Left = 288
|
Left = 288
|
||||||
Height = 300
|
Height = 339
|
||||||
Top = 204
|
Top = 177
|
||||||
Width = 400
|
Width = 400
|
||||||
Caption = 'FPSVisual'
|
Caption = 'FPSVisual'
|
||||||
ClientHeight = 300
|
ClientHeight = 319
|
||||||
ClientWidth = 400
|
ClientWidth = 400
|
||||||
LCLVersion = '0.9.29'
|
Menu = MainMenu1
|
||||||
|
LCLVersion = '1.3'
|
||||||
object sWorksheetGrid1: TsWorksheetGrid
|
object sWorksheetGrid1: TsWorksheetGrid
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 232
|
Height = 192
|
||||||
Top = 8
|
Top = 48
|
||||||
Width = 384
|
Width = 384
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object buttonPopulateGrid: TButton
|
object buttonPopulateGrid: TButton
|
||||||
Left = 144
|
Left = 136
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 256
|
Top = 264
|
||||||
Width = 112
|
Width = 112
|
||||||
Caption = 'Populate Grid'
|
Caption = 'Populate Grid'
|
||||||
OnClick = buttonPopulateGridClick
|
OnClick = buttonPopulateGridClick
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
|
object OpenDialog1: TOpenDialog
|
||||||
|
DefaultExt = '.xls'
|
||||||
|
Filter = 'Excel spreadsheet (*.xls)|*.xls|Excel XML spreadsheet (*.xlsx)|*.xlxs|LibreOffice/OpenOffice spreadsheet (*.ods)|*.ods|Wikitable (pipes) (.wikitable_pipes)|.wikitable_pipes|All files (*.*)|*.*'
|
||||||
|
Options = [ofExtensionDifferent, ofEnableSizing, ofViewDetail]
|
||||||
|
left = 8
|
||||||
|
top = 264
|
||||||
|
end
|
||||||
|
object SaveDialog1: TSaveDialog
|
||||||
|
DefaultExt = '.xls'
|
||||||
|
Filter = 'Excel spreadsheet (*.xls)|*.xls|Excel XML spreadsheet (*.xlsx)|*.xlsx|LibreOffice/OpenOffice spreadsheet (*.ods)|*.ods|Wikitable (wikimedia) (.wikitable_wikimedia)|*.wikitable_wikimedia'
|
||||||
|
Options = [ofExtensionDifferent, ofEnableSizing, ofViewDetail]
|
||||||
|
left = 72
|
||||||
|
top = 264
|
||||||
|
end
|
||||||
|
object MainMenu1: TMainMenu
|
||||||
|
left = 296
|
||||||
|
top = 264
|
||||||
|
object mnuFile: TMenuItem
|
||||||
|
Caption = '&File'
|
||||||
|
object mnuOpen: TMenuItem
|
||||||
|
Caption = '&Open...'
|
||||||
|
OnClick = mnuOpenClick
|
||||||
|
end
|
||||||
|
object mnuSaveAs: TMenuItem
|
||||||
|
Caption = '&Save as...'
|
||||||
|
OnClick = mnuSaveAsClick
|
||||||
|
end
|
||||||
|
object mnuQuit: TMenuItem
|
||||||
|
Caption = '&Quit'
|
||||||
|
OnClick = mnuQuitClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,11 +1,26 @@
|
|||||||
{ This is an automatically generated lazarus resource file }
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('TForm1','FORMDATA',[
|
LazarusResources.Add('TForm1','FORMDATA',[
|
||||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3' '#1#6'Height'#3','#1#3'Top'#3#204#0#5'Wi'
|
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3' '#1#6'Height'#3'S'#1#3'Top'#3#177#0#5'Wi'
|
||||||
+'dth'#3#144#1#7'Caption'#6#9'FPSVisual'#12'ClientHeight'#3','#1#11'ClientWid'
|
+'dth'#3#144#1#7'Caption'#6#9'FPSVisual'#12'ClientHeight'#3'?'#1#11'ClientWid'
|
||||||
+'th'#3#144#1#10'LCLVersion'#6#6'0.9.29'#0#15'TsWorksheetGrid'#15'sWorksheetG'
|
+'th'#3#144#1#4'Menu'#7#9'MainMenu1'#10'LCLVersion'#6#3'1.3'#0#15'TsWorksheet'
|
||||||
+'rid1'#4'Left'#2#8#6'Height'#3#232#0#3'Top'#2#8#5'Width'#3#128#1#8'TabOrder'
|
+'Grid'#15'sWorksheetGrid1'#4'Left'#2#8#6'Height'#3#192#0#3'Top'#2'0'#5'Width'
|
||||||
+#2#0#0#0#7'TButton'#18'buttonPopulateGrid'#4'Left'#3#144#0#6'Height'#2#25#3
|
+#3#128#1#8'TabOrder'#2#0#0#0#7'TButton'#18'buttonPopulateGrid'#4'Left'#3#136
|
||||||
+'Top'#3#0#1#5'Width'#2'p'#7'Caption'#6#13'Populate Grid'#7'OnClick'#7#23'but'
|
+#0#6'Height'#2#25#3'Top'#3#8#1#5'Width'#2'p'#7'Caption'#6#13'Populate Grid'#7
|
||||||
+'tonPopulateGridClick'#8'TabOrder'#2#1#0#0#0
|
+'OnClick'#7#23'buttonPopulateGridClick'#8'TabOrder'#2#1#0#0#11'TOpenDialog'
|
||||||
|
+#11'OpenDialog1'#10'DefaultExt'#6#4'.xls'#6'Filter'#6#192'Excel spreadsheet '
|
||||||
|
+'(*.xls)|*.xls|Excel XML spreadsheet (*.xlsx)|*.xlxs|LibreOffice/OpenOffice '
|
||||||
|
+'spreadsheet (*.ods)|*.ods|Wikitable (pipes) (.wikitable_pipes)|.wikitable_p'
|
||||||
|
+'ipes|All files (*.*)|*.*'#7'Options'#11#20'ofExtensionDifferent'#14'ofEnabl'
|
||||||
|
+'eSizing'#12'ofViewDetail'#0#4'left'#2#8#3'top'#3#8#1#0#0#11'TSaveDialog'#11
|
||||||
|
+'SaveDialog1'#10'DefaultExt'#6#4'.xls'#6'Filter'#6#185'Excel spreadsheet (*.'
|
||||||
|
+'xls)|*.xls|Excel XML spreadsheet (*.xlsx)|*.xlsx|LibreOffice/OpenOffice spr'
|
||||||
|
+'eadsheet (*.ods)|*.ods|Wikitable (wikimedia) (.wikitable_wikimedia)|*.wikit'
|
||||||
|
+'able_wikimedia'#7'Options'#11#20'ofExtensionDifferent'#14'ofEnableSizing'#12
|
||||||
|
+'ofViewDetail'#0#4'left'#2'H'#3'top'#3#8#1#0#0#9'TMainMenu'#9'MainMenu1'#4'l'
|
||||||
|
+'eft'#3'('#1#3'top'#3#8#1#0#9'TMenuItem'#7'mnuFile'#7'Caption'#6#5'&File'#0#9
|
||||||
|
+'TMenuItem'#7'mnuOpen'#7'Caption'#6#8'&Open...'#7'OnClick'#7#12'mnuOpenClick'
|
||||||
|
+#0#0#9'TMenuItem'#9'mnuSaveAs'#7'Caption'#6#11'&Save as...'#7'OnClick'#7#14
|
||||||
|
+'mnuSaveAsClick'#0#0#9'TMenuItem'#7'mnuQuit'#7'Caption'#6#5'&Quit'#7'OnClick'
|
||||||
|
+#7#12'mnuQuitClick'#0#0#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -6,7 +6,8 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||||
StdCtrls, fpspreadsheetgrid, fpspreadsheet;
|
StdCtrls, Menus,
|
||||||
|
fpspreadsheetgrid, fpspreadsheet, fpsallformats;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -14,8 +15,18 @@ type
|
|||||||
|
|
||||||
TForm1 = class(TForm)
|
TForm1 = class(TForm)
|
||||||
buttonPopulateGrid: TButton;
|
buttonPopulateGrid: TButton;
|
||||||
|
MainMenu1: TMainMenu;
|
||||||
|
mnuFile: TMenuItem;
|
||||||
|
mnuOpen: TMenuItem;
|
||||||
|
mnuQuit: TMenuItem;
|
||||||
|
mnuSaveAs: TMenuItem;
|
||||||
|
OpenDialog1: TOpenDialog;
|
||||||
|
SaveDialog1: TSaveDialog;
|
||||||
sWorksheetGrid1: TsWorksheetGrid;
|
sWorksheetGrid1: TsWorksheetGrid;
|
||||||
procedure buttonPopulateGridClick(Sender: TObject);
|
procedure buttonPopulateGridClick(Sender: TObject);
|
||||||
|
procedure mnuOpenClick(Sender: TObject);
|
||||||
|
procedure mnuQuitClick(Sender: TObject);
|
||||||
|
procedure mnuSaveAsClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ private declarations }
|
{ private declarations }
|
||||||
public
|
public
|
||||||
@ -30,6 +41,7 @@ implementation
|
|||||||
{ TForm1 }
|
{ TForm1 }
|
||||||
|
|
||||||
procedure TForm1.buttonPopulateGridClick(Sender: TObject);
|
procedure TForm1.buttonPopulateGridClick(Sender: TObject);
|
||||||
|
// Populate grid with some demo data
|
||||||
var
|
var
|
||||||
lWorksheet: TsWorksheet;
|
lWorksheet: TsWorksheet;
|
||||||
begin
|
begin
|
||||||
@ -42,6 +54,40 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.mnuOpenClick(Sender: TObject);
|
||||||
|
// Loads first worksheet from file into grid
|
||||||
|
begin
|
||||||
|
if OpenDialog1.Execute then
|
||||||
|
begin
|
||||||
|
sWorksheetGrid1.LoadFromSpreadsheetFile(OpenDialog1.FileName);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.mnuQuitClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.mnuSaveAsClick(Sender: TObject);
|
||||||
|
// Saves sheet in grid to file, overwriting existing file
|
||||||
|
var
|
||||||
|
lWorkBook: TsWorkbook;
|
||||||
|
lWorkSheet:TsWorksheet;
|
||||||
|
begin
|
||||||
|
if SaveDialog1.Execute then
|
||||||
|
begin
|
||||||
|
lWorkBook := TsWorkBook.Create;
|
||||||
|
lWorkSheet := lWorkBook.AddWorksheet('Sheet1');
|
||||||
|
try
|
||||||
|
sWorksheetGrid1.SaveToWorksheet(lWorkSheet);
|
||||||
|
lWorkBook.WriteToFile(SaveDialog1.FileName,true);
|
||||||
|
finally
|
||||||
|
lWorkBook.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
{$I mainform.lrs}
|
{$I mainform.lrs}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user