fpspreadsheet: Fix incorrect column names left in ooxml format (issue #0026447)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3273 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2014-07-03 16:12:43 +00:00
parent 359ddca7b8
commit 81ff33e7d6
3 changed files with 10 additions and 15 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<Version Value="9"/> <Version Value="9"/>
@ -39,12 +39,11 @@
<Unit0> <Unit0>
<Filename Value="ooxmlwrite.lpr"/> <Filename Value="ooxmlwrite.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ooxmlwrite"/>
</Unit0> </Unit0>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="10"/> <Version Value="11"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<SearchPaths> <SearchPaths>
<OtherUnitFiles Value=".."/> <OtherUnitFiles Value=".."/>
@ -55,11 +54,10 @@
<UseAnsiStrings Value="False"/> <UseAnsiStrings Value="False"/>
</SyntaxOptions> </SyntaxOptions>
</Parsing> </Parsing>
<Other> <Linking>
<CompilerMessages> <Debugging>
<UseMsgFile Value="True"/> <DebugInfoType Value="dsDwarf2Set"/>
</CompilerMessages> </Debugging>
<CompilerPath Value="$(CompPath)"/> </Linking>
</Other>
</CompilerOptions> </CompilerOptions>
</CONFIG> </CONFIG>

View File

@ -33,6 +33,8 @@ begin
MyWorksheet.WriteNumber(0, 2, 3.0); MyWorksheet.WriteNumber(0, 2, 3.0);
MyWorksheet.WriteNumber(0, 3, 4.0); MyWorksheet.WriteNumber(0, 3, 4.0);
MyWorksheet.WriteUTF8Text(0, 26, 'AA'); // Test for column name
// Uncomment this to test large XLS files // Uncomment this to test large XLS files
for i := 2 to 2{20} do for i := 2 to 2{20} do
begin begin

View File

@ -1588,13 +1588,8 @@ end;
and zero based, to a textual representation which is [Col][Row], and zero based, to a textual representation which is [Col][Row],
being that the Col is in letters and the row is in 1-based numbers } being that the Col is in letters and the row is in 1-based numbers }
class function TsWorksheet.CellPosToText(ARow, ACol: Cardinal): string; class function TsWorksheet.CellPosToText(ARow, ACol: Cardinal): string;
var
lStr: string;
begin begin
lStr := ''; Result := GetCellString(ARow, ACol, [rfRelCol, rfRelRow]);
if ACol < 26 then lStr := Char(ACol+65);
Result := Format('%s%d', [lStr, ARow+1]);
end; end;
{@@ {@@