diff --git a/components/fpspreadsheet/examples/excel2demo/excel2write.lpi b/components/fpspreadsheet/examples/excel2demo/excel2write.lpi index 0cf19942b..09bc45b5a 100644 --- a/components/fpspreadsheet/examples/excel2demo/excel2write.lpi +++ b/components/fpspreadsheet/examples/excel2demo/excel2write.lpi @@ -7,11 +7,11 @@ + <UseAppBundle Value="False"/> - <ActiveEditorIndexAtStart Value="0"/> </General> <VersionInfo> <ProjectVersion Value=""/> @@ -33,212 +33,13 @@ <PackageName Value="laz_fpspreadsheet"/> </Item1> </RequiredPackages> - <Units Count="12"> + <Units Count="1"> <Unit0> <Filename Value="excel2write.lpr"/> <IsPartOfProject Value="True"/> <UnitName Value="excel2write"/> - <CursorPos X="33" Y="2"/> - <TopLine Value="1"/> - <EditorIndex Value="0"/> - <UsageCount Value="309"/> - <Loaded Value="True"/> </Unit0> - <Unit1> - <Filename Value="..\fpolestorage.pas"/> - <UnitName Value="fpolestorage"/> - <CursorPos X="1" Y="1"/> - <TopLine Value="1"/> - <UsageCount Value="19"/> - </Unit1> - <Unit2> - <Filename Value="..\..\..\..\..\lazarus\lcl\interfaces\win32\win32wsstdctrls.pp"/> - <UnitName Value="Win32WSStdCtrls"/> - <CursorPos X="35" Y="720"/> - <TopLine Value="713"/> - <UsageCount Value="76"/> - </Unit2> - <Unit3> - <Filename Value="..\..\..\..\..\lazarus\ideintf\componenteditors.pas"/> - <UnitName Value="ComponentEditors"/> - <CursorPos X="40" Y="332"/> - <TopLine Value="330"/> - <UsageCount Value="74"/> - </Unit3> - <Unit4> - <Filename Value="..\..\xlsbiff5.pas"/> - <UnitName Value="xlsbiff5"/> - <CursorPos X="1" Y="224"/> - <TopLine Value="215"/> - <EditorIndex Value="3"/> - <UsageCount Value="140"/> - <Loaded Value="True"/> - </Unit4> - <Unit5> - <Filename Value="..\..\fpsutils.pas"/> - <UnitName Value="fpsutils"/> - <CursorPos X="1" Y="49"/> - <TopLine Value="30"/> - <EditorIndex Value="2"/> - <UsageCount Value="140"/> - <Loaded Value="True"/> - </Unit5> - <Unit6> - <Filename Value="..\..\xlsbiff2.pas"/> - <UnitName Value="xlsbiff2"/> - <CursorPos X="1" Y="69"/> - <TopLine Value="57"/> - <EditorIndex Value="4"/> - <UsageCount Value="139"/> - <Loaded Value="True"/> - </Unit6> - <Unit7> - <Filename Value="..\..\fpolestorage.pas"/> - <UnitName Value="fpolestorage"/> - <CursorPos X="30" Y="654"/> - <TopLine Value="642"/> - <EditorIndex Value="5"/> - <UsageCount Value="139"/> - <Loaded Value="True"/> - </Unit7> - <Unit8> - <Filename Value="..\..\..\..\..\lazarus26\fpc\2.2.2\source\rtl\objpas\classes\classesh.inc"/> - <CursorPos X="19" Y="562"/> - <TopLine Value="553"/> - <UsageCount Value="41"/> - </Unit8> - <Unit9> - <Filename Value="..\..\..\..\..\lazarus26\fpc\2.2.2\source\rtl\objpas\classes\streams.inc"/> - <CursorPos X="21" Y="158"/> - <TopLine Value="151"/> - <UsageCount Value="41"/> - </Unit9> - <Unit10> - <Filename Value="..\..\fpspreadsheet.pas"/> - <UnitName Value="fpspreadsheet"/> - <CursorPos X="21" Y="67"/> - <TopLine Value="57"/> - <EditorIndex Value="1"/> - <UsageCount Value="92"/> - <Loaded Value="True"/> - </Unit10> - <Unit11> - <Filename Value="..\..\..\..\..\lazarus\lcl\include\customtrayicon.inc"/> - <CursorPos X="22" Y="203"/> - <TopLine Value="197"/> - <UsageCount Value="67"/> - </Unit11> </Units> - <JumpHistory Count="27" HistoryIndex="26"> - <Position1> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="40" Column="5" TopLine="31"/> - </Position1> - <Position2> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="472" Column="49" TopLine="461"/> - </Position2> - <Position3> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="405" Column="5" TopLine="386"/> - </Position3> - <Position4> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="404" Column="14" TopLine="401"/> - </Position4> - <Position5> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="79" Column="42" TopLine="72"/> - </Position5> - <Position6> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="78" Column="31" TopLine="67"/> - </Position6> - <Position7> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="314" Column="39" TopLine="296"/> - </Position7> - <Position8> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="479" Column="1" TopLine="469"/> - </Position8> - <Position9> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="470" Column="1" TopLine="460"/> - </Position9> - <Position10> - <Filename Value="..\..\xlsbiff5.pas"/> - <Caret Line="217" Column="3" TopLine="205"/> - </Position10> - <Position11> - <Filename Value="..\..\xlsbiff5.pas"/> - <Caret Line="218" Column="23" TopLine="208"/> - </Position11> - <Position12> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="78" Column="10" TopLine="66"/> - </Position12> - <Position13> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="375" Column="1" TopLine="367"/> - </Position13> - <Position14> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="76" Column="17" TopLine="65"/> - </Position14> - <Position15> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="363" Column="1" TopLine="357"/> - </Position15> - <Position16> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="77" Column="7" TopLine="76"/> - </Position16> - <Position17> - <Filename Value="..\..\fpspreadsheet.pas"/> - <Caret Line="137" Column="40" TopLine="129"/> - </Position17> - <Position18> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="563" Column="5" TopLine="544"/> - </Position18> - <Position19> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="486" Column="5" TopLine="467"/> - </Position19> - <Position20> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="510" Column="5" TopLine="491"/> - </Position20> - <Position21> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="94" Column="46" TopLine="84"/> - </Position21> - <Position22> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="686" Column="5" TopLine="667"/> - </Position22> - <Position23> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="567" Column="5" TopLine="548"/> - </Position23> - <Position24> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="622" Column="1" TopLine="618"/> - </Position24> - <Position25> - <Filename Value="..\..\fpolestorage.pas"/> - <Caret Line="621" Column="29" TopLine="611"/> - </Position25> - <Position26> - <Filename Value="excel2write.lpr"/> - <Caret Line="30" Column="21" TopLine="19"/> - </Position26> - <Position27> - <Filename Value="excel2write.lpr"/> - <Caret Line="37" Column="30" TopLine="18"/> - </Position27> - </JumpHistory> </ProjectOptions> <CompilerOptions> <Version Value="8"/> diff --git a/components/fpspreadsheet/xlsbiff2.pas b/components/fpspreadsheet/xlsbiff2.pas index 2cdeb7967..0aa06c860 100755 --- a/components/fpspreadsheet/xlsbiff2.pas +++ b/components/fpspreadsheet/xlsbiff2.pas @@ -270,6 +270,8 @@ var L: Byte; AnsiText: ansistring; begin + if AValue = '' then Exit; // Writing an empty text doesn't work + AnsiText := UTF8ToAnsi(AValue); L := Length(AnsiText); diff --git a/components/fpspreadsheet/xlsbiff5.pas b/components/fpspreadsheet/xlsbiff5.pas index f7df36bec..b8a806c0c 100755 --- a/components/fpspreadsheet/xlsbiff5.pas +++ b/components/fpspreadsheet/xlsbiff5.pas @@ -661,6 +661,8 @@ var L: Word; AnsiValue: ansistring; begin + if AValue = '' then Exit; // Writing an empty text doesn't work + AnsiValue := UTF8ToAnsi(AValue); L := Length(AnsiValue);