toni_t_banire@gsk.com has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to copy data from one spreadsheet to another. The data in spreadheet A is derived from a formula so I want SpreadsheetB to copy just the values and not drag along the formula with it.
I set up a macro which I am now trying to convert into perl
I am ok with everything except or line 4.
Below is my code:
$excel = CreateObject OLE "Excel.Application" || die "CreateObject : $ +!\n"; $excel -> {Visible}=1; $excelfile2 = $excel -> Workbooks -> Open("c:\\sheetA.xls"); $excelfile = $excel -> Workbooks -> Open("c:\\sheetB.xls"); $xls4 = $excelfile -> Worksheets(1); $xls5 = $excelfile2 -> Worksheets(1); $xls5 -> Range ("H58:H105") -> Copy; $xls4 -> Cells (9, 15) -> {PasteSpecial} ="Paste=xlValues, Operation=x +lNone, SkipBlanks=False, Transpose=False"; $xls4 -> Cells (9, 14) -> Select;
Everything works ok except for the Paste = xlValues. The data is pasted in the right column put it still shows the link to SheetA.xls rather than just the value.
I need to do things this way as I have to send SheetB.xls to peole who wont have a copy of SheetA.xls and I don't want excel to warn about links to another spreadheet when SheetB.xls is opened
Can someone pleeeassssssseeeeeee HELP me
Toni
Edited by footpad, ~Thu Nov 29 05:38:14 2001 (GMT)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: excel pasting
by c-era (Curate) on Nov 28, 2001 at 22:16 UTC | |
by toni_t_banire@gsk.com (Initiate) on Nov 29, 2001 at 18:06 UTC | |
|
Re: excel pasting
by osfameron (Hermit) on Nov 28, 2001 at 21:49 UTC | |
|
Re: excel pasting
by Anonymous Monk on Jun 28, 2016 at 09:51 UTC | |
by marto (Cardinal) on Jun 28, 2016 at 09:59 UTC |