Who can help, what kind of instruction?
CodePudding user response:
PasteSpecial
Var
FExcel: Variant;
FWorkbook: Variant;
FWorksheet: Variant;
The begin
Try
FExcel:=CreateOleObject (' excel. Application);
Except,
Screen. The cursor:=crDefault;
MessageDlg (' Could not start Microsoft Excel! ', mtError, [mbCancel], 0);
The Exit;
end;
Try
FWorkBook:=FExcel WorkBooks. Add;
//FWorkSheet:=FWorkBook. WorkSheets. Add;
FWorkSheet:=FWorkBook WorkSheets [1].
//add code here to copy image to clipboard
FWorkSheet. Cells [1, 1]. PasteSpecial;//to the inside of the clipboard images pasted into the first row, first column
The finally
FExcel. Visible:=True;
end;
CodePudding user response:
That's how I do, or not, or post with borders do not conform to the requirementsCodePudding user response:
Post your code to see,,,What is the frame is not in conformity with the requirements?
CodePudding user response:
Procedure Tgcglfrm. Pstpic (sheet_s: olevariant);//from the gallery (excel file) copy the blanking sheet hereVar
I, ys: integer;
Soup, sheet: olevariant;
The begin
Try
Ys:=0;
Soup:=exl. Workbooks. Open (GCMGFLN. Value);
Ys:=1;
The finally
If ys=1 then
The begin
Try
Ys:=0;
Sheet:=soup. Sheets [XLDFRM. BHC. Text];
Ys:=1;
The finally
If ys=1 then
The begin
Sheet. Range [' A2: f16]. Copy;
Sheet_s. Cells [2, 1]. PasteSpecial;
end;
end;
end;
end;
end;
Sheet is a template file, sheet_s is the target file
CodePudding user response:
The above code from a file of copies of the main out of the picture on the clipboard, after but the execution to paste the clipboard operation "sheet_s. Cells (2, 1] PasteSpecial;" After no response, but manual paste can be labeled, images have been copied, just paste the code is invalidCodePudding user response: