请问怎么将Excel文件转换为dbase3格式?--(在线等) ( 积分: 50 )

  • 主题发起人 主题发起人 delphi_lp
  • 开始时间 开始时间
D

delphi_lp

Unregistered / Unconfirmed
GUEST, unregistred user!
excel另存为DBF 格式为dbase3, 函数是什么?
或者具体点代码!
 
如果合理,另有加分!在线等!
 
DFW的兄弟姐妹们 ,帮个忙啊!
 
excel另存为DBF 格式为dbase3, 函数是什么?

没有人知道么
 
const
xlAddIn = $00000012;
xlCSV = $00000006;
xlCSVMac = $00000016;
xlCSVMSDOS = $00000018;
xlCSVWindows = $00000017;
xlDBF2 = $00000007;
xlDBF3 = $00000008;
xlDBF4 = $0000000B;
xlDIF = $00000009;
xlExcel2 = $00000010;
xlExcel2FarEast = $0000001B;
xlExcel3 = $0000001D;
xlExcel4 = $00000021;
xlExcel5 = $00000027;
xlExcel7 = $00000027;
xlExcel9795 = $0000002B;
xlExcel4Workbook = $00000023;
xlIntlAddIn = $0000001A;
xlIntlMacro = $00000019;
xlWorkbookNormal = $FFFFEFD1;
xlSYLK = $00000002;
xlTemplate = $00000011;
xlCurrentPlatformText = $FFFFEFC2;
xlTextMac = $00000013;
xlTextMSDOS = $00000015;
xlTextPrinter = $00000024;
xlTextWindows = $00000014;
xlWJ2WD1 = $0000000E;
xlWK1 = $00000005;
xlWK1ALL = $0000001F;
xlWK1FMT = $0000001E;
xlWK3 = $0000000F;
xlWK4 = $00000026;
xlWK3FM3 = $00000020;
xlWKS = $00000004;
xlWorks2FarEast = $0000001C;
xlWQ1 = $00000022;
xlWJ3 = $00000028;
xlWJ3FJ3 = $00000029;
xlUnicodeText = $0000002A;
xlHtml = $0000002C;
xlWebArchive = $0000002D;
xlXMLSpreadsheet = $0000002E;

function TForm1.SaveAsNewFormat(OldFile, NewFile: string;
Format: Integer): Boolean;
var
ExcelApp: OleVariant;
begin
Result := False;
try
ExcelApp := CreateOleObject('ExcelAppliaction');
except
Exit;
end;
ExcelApp.WorkBooks.Open(OldFile);
ExcelApp.ActiveWorkBook.SaveAs(NewFile, Format);
ExcelApp.Quit;
end;
 
我是直接把SAVEAS改成c:/a.dbf的
请问你能讲解一下么
我也正在学习,一会结贴给分!
 
谢谢 已解决!
 
const
xlAddIn = $00000012;
xlCSV = $00000006;
xlCSVMac = $00000016;
xlCSVMSDOS = $00000018;
xlCSVWindows = $00000017;
xlDBF2 = $00000007;
xlDBF3 = $00000008;
xlDBF4 = $0000000B;
xlDIF = $00000009;
xlExcel2 = $00000010;
xlExcel2FarEast = $0000001B;
xlExcel3 = $0000001D;
xlExcel4 = $00000021;
xlExcel5 = $00000027;
xlExcel7 = $00000027;
xlExcel9795 = $0000002B;
xlExcel4Workbook = $00000023;
xlIntlAddIn = $0000001A;
xlIntlMacro = $00000019;
xlWorkbookNormal = $FFFFEFD1;
xlSYLK = $00000002;
xlTemplate = $00000011;
xlCurrentPlatformText = $FFFFEFC2;
xlTextMac = $00000013;
xlTextMSDOS = $00000015;
xlTextPrinter = $00000024;
xlTextWindows = $00000014;
xlWJ2WD1 = $0000000E;
xlWK1 = $00000005;
xlWK1ALL = $0000001F;
xlWK1FMT = $0000001E;
xlWK3 = $0000000F;
xlWK4 = $00000026;
xlWK3FM3 = $00000020;
xlWKS = $00000004;
xlWorks2FarEast = $0000001C;
xlWQ1 = $00000022;
xlWJ3 = $00000028;
xlWJ3FJ3 = $00000029;
xlUnicodeText = $0000002A;
xlHtml = $0000002C;
xlWebArchive = $0000002D;
xlXMLSpreadsheet = $0000002E;

这些具体是做什么的?谁能讲讲, 我用xlCSV 转换后丢数据的!
 
excel保存支持的格式
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
913
SUNSTONE的Delphi笔记
S
后退
顶部