CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Still having trouble adding an image to excel "HELP??"

 



rekcut01
Novice

May 13, 2014, 11:51 AM

Post #1 of 5 (2469 views)
Still having trouble adding an image to excel "HELP??" Can't Post

   



I have used several ways of inserting an image and keep getting:

Can't locate object method "insertImage" via package "Spreadsheet::ParseExcel::SaveParser::Worksheet" at C:/Program Files (x86)/Apache Group/Apache2/cgi-bin/sqlconfig.pl

I have tried:

my $image_file_full = 'C:/Users/Rtucker/Desktop/vbadgeBC.png';
$worksheet3->insertImage('a6', $image_file_full );

my $image_file_full = 'C:/Users/Rtucker/Desktop/vbadgeBC.png';
$worksheet3->insert_image('a6', $image_file_full );

my $image_file_full = 'C:/Users/Rtucker/Desktop/vbadgeBC.png';
$worksheet3->InsertImage('a6', $image_file_full );

and continue to get the same error, can someone please tell me what I'm doing wrong?



Thanks

Rick


FishMonger
Veteran / Moderator

May 13, 2014, 12:11 PM

Post #2 of 5 (2457 views)
Re: [rekcut01] Still having trouble adding an image to excel "HELP??" [In reply to] Can't Post

What does the documentation say how the method is spelled and are you sure that the method you're attempting to use is defined in Spreadsheet::ParseExcel::SaveParser::Worksheet or one of the modules in its inheritance chain?


rekcut01
Novice

May 13, 2014, 12:19 PM

Post #3 of 5 (2451 views)
Re: [rekcut01] Still having trouble adding an image to excel "HELP??" [In reply to] Can't Post

The documentation is saying it's "insert_image();" and its in the Spreadsheet:WriteExcel; that's what baffles me is why it's looking in the "insert_image" via package "Spreadsheet::ParseExcel::SaveParser::Worksheet" package? I have "use Spreadsheet:WriteExcel" as well in my include section. I'm pulling my hair (whats left of it) out trying to figure this one out Smile.

Thanks

Rick


FishMonger
Veteran / Moderator

May 13, 2014, 12:30 PM

Post #4 of 5 (2447 views)
Re: [rekcut01] Still having trouble adding an image to excel "HELP??" [In reply to] Can't Post

How did you declare the object?

When troubleshooting issues like this, start by writing a SHORT BUT COMPLETE script that demonstrates the issue. In most cases the solution will become clear or at least make it much easier for us to point out the problem.

Based on your prior related questions, Id say that the key issue is that you're creating the object via one of the lower level support modules rather than the main module that load those lower level support modules.


rekcut01
Novice

May 13, 2014, 2:23 PM

Post #5 of 5 (2433 views)
Re: [FishMonger] Still having trouble adding an image to excel "HELP??" [In reply to] Can't Post

Hey FishMonger!

I figured it out, what I ended up doing was creating the excel file with a new, insert the image and close the file, then open it back up with the parser and parse thru it adding the other badge info I needed... it was looking in the SpreadSheet::ParseExcel for a function called insert_image() which of course wasn't in there it was in the SpreadSheet::WriteExcel library. Stinks that I have to create the file and insert, close and open it back up but, hey, it works!!



Thanks again for your help!

Rick

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives