Hi,
when setting a cell value for a column formatted as Text & Numeric,
leading zeros get lost (V8, SR2). This was not the case in Origin 7.5.
Setting the bConsiderNumeric argument doesn't change anything. Is it a bug? I have to format the column as Text, but then I cannot adress the column as dataset anymore.
void TestSetStringCell()
{
Worksheet wks;
wks.Create(NULL, CREATE_VISIBLE);
// differs from Origin 7.5, leading zero gets lost
wks.SetCell(0, 0, "0123", false); // bConsiderNumeric == false
wks.SetCell(1, 0, "0123", true);
Dataset ds(wks,0);
ds.SetSize(10);
ds.SetText(4,"0123");
// works
wks.Columns(1).SetFormat(OKCOLTYPE_TEXT);
wks.SetCell(0, 1, "0123", false);
wks.SetCell(1, 1, "0123", true);
}
Is there any other solution than setting the column as text column in order to get the old behavior?
Best regards,
Michael