大家好:
如何将cxgrid中的资料导出到excel中,且excel 中含有图片。见下图!图片数据是存放在数据库中的image字段中。谢谢!
如何将cxgrid中的资料导出到excel中,且excel 中含有图片。见下图!图片数据是存放在数据库中的image字段中。谢谢!
解决方案 »
- 关于TObject的强制类型转换,谢谢了
- 如何滚动StringGrid表格显示出当前选择项?
- 突然发现很多未结的贴子,有点打击积极性哦
- 请问经常在程序里看到这些字符#96是来自于什么地方?代表什么含义?
- 串口通讯(发了几个难道csdn上就没人有会吗?)
- 关于在google上下载图片的问题
- 怎样才能把东西脱进去运行
- 请问$ff指的是什么意思,13000 and $ff又是如何转换成200的
- Com初学问题
- 多线程里用TBlobField上传图片报内存错误。
- 紧急!!!!!紧急!!!!关于透明窗口,TShockwaveFlash,TCustomForm和TForm的绘制和继承问题
- 【散分】在职最后一天
type
TSupportedExportType = (exHTML, exXML, exExcel97, exExcel, exPDF, exText);
procedure TfrmMain.DoExport(AExportType: TSupportedExportType);
var
AFileName: string; function GetFileName(var AFileName: string): Boolean;
const
DefaultExtensions: array[TSupportedExportType] of string =
('html', 'xml', 'xls', 'xlsx', 'pdf', 'txt');
Filters: array[TSupportedExportType] of string =
('HTML File (*.html)|*.html',
'XML File (*.xml)|*.xml',
'Microsoft Excel 97-2003 Worksheet (*.xls)|*.xls',
'Microsoft Excel 2007-2010 (*.xlsx)|*.xlsx',
'Adobe Reader (*.pdf)|*.pdf',
'Text file (*.txt)|*.txt');
begin
with TSaveDialog.Create(Self) do
try
DefaultExt := DefaultExtensions[AExportType];
Filter := Filters[AExportType];
FileName := dxFrameManager.ActiveFrame.ExportFileName;
InitialDir := ExtractFilePath(Application.ExeName);
Options := Options + [ofOverwritePrompt];
Result := Execute;
if Result then AFileName := FileName;
finally
Free;
end;
end;begin
if not IsSupportExport(AExportType) then
begin
Application.MessageBox(PChar(sdxExportGridMessage), PChar(sdxExportGridMessageCaption),
MB_ICONINFORMATION);
Exit;
end;
if not GetFileName(AFileName) then Exit;
dxFrameManager.ActiveFrame.DoExport(AExportType, AFileName);
if (Application.MessageBox(PChar(sdxOpenFile + AFileName +' ?'), PChar(sdxConfirm),
MB_ICONQUESTION + MB_YESNO) = ID_YES) then
DoExecuteApplication(AFileName);
end;
您好!
试了你给我的代码,还是不行。提示
[Error] Unit1.pas(65): Undeclared identifier: 'dxFrameManager'。
我用的版本是DEV 5.36版本。不知道您使用的是那个版本。
谢谢!