小弟的程序中,需要将wwdbgrid中显示的数据导入到一个csv文件中然后打开它,代码如下:
with wdbgtemp, wdbgtemp.ExportOptions do
begin
ExportType := wwgetTxt;
FileName := 'export.csv';
Delimiter := ',';
Save;
if not(esoClipboard in Options) then
ShellExecute(Handle, 'OPEN', PChar(wdbgtemp.exportoptions.Filename), nil, nil,
sw_shownormal)
end;大致成功,可形如‘00123’的字符串却变成了‘123’,各位大侠也该碰到过类似情况吧,不知道该怎么解决?
with wdbgtemp, wdbgtemp.ExportOptions do
begin
ExportType := wwgetTxt;
FileName := 'export.csv';
Delimiter := ',';
Save;
if not(esoClipboard in Options) then
ShellExecute(Handle, 'OPEN', PChar(wdbgtemp.exportoptions.Filename), nil, nil,
sw_shownormal)
end;大致成功,可形如‘00123’的字符串却变成了‘123’,各位大侠也该碰到过类似情况吧,不知道该怎么解决?
ColumnRange.Columns[1].numberformatlocal:='@';
Sub Macro1()
'
' Macro1 Macro
' Borlandor 录制 2/24/2003
'
'
Selection.NumberFormatLocal = "@"
Range("D3").Select
ActiveCell.FormulaR1C1 = "00011"
Range("D4").Select
End Sub
Delphi:
ExcelApplication.Cells.NumberFormatLocal := '@';
同意Borlandor(五角大民);