Programatically convert Excel workbook sheet to an image (bmp or jpeg)

My client has a requirement for me to convert an Excel workbook sheet to an image of any kind, bmp, jpeg, ect. This is a batch Java 1.5 application and I have generated a spreadsheet using JExcelApi. Now I need to email the spreadsheet as an inline image ... the client does not want an attachment. I'm using the Spring framework Mail api to actually email it. This api requires inline content be an image. Therefore, I need a way to programatically convert Excel to an image.
I've done my homework and researched for many hours now, but have not come up with any solutions. I also looked at 3rd party tools googling thru pages and pages of converters, but they all seem to be GUI tools to manually do the conversion. Aspose.cells looked promising but it only supports .Net, for this functionality. Please suggest a 3rd party tool, or provide a code sample of how to do the conversion.
Thanks!

hi
if u are using jdk u may try this for saving an Image img to an OutputStream out in jpg format
import com.sun.image.codec.jpeg.*;
JPEGImageEncoder imageEncoder = JPEGCodec.createJPEGEncoder(out);
JPEGEncodeParam encodeParam = JPEGCodec.getDefaultJPEGEncodeParam(img);
encodeParam.setQuality(.75f, true);
imageEncoder.encode(img, encodeParam);
Hope it helps !
Gabi

Similar Messages

  • How can I make Numbers respect the row and column locks in an Excel workbook opened in Numbers???

    I have a Windows server app that generates Excel workbooks to be emailed to political campaign volunteers to be loaded into Numbers on an iPad, edited, then emailed back to be posted to the server database.  There are two problems encountered:
    1.  The Excel workbook has the first row (column headings) and first column (route identifier) of cells locked, so that they will not scroll off the screen, but Numbers doesn't respect the locks, so when the user scrolls horizontally or vertically, the column headings and/or the route identifier scroll off the screen.
    2.  The Excel workbook has pop-up "tool-tip" type comments in certain column headings in order to provide the user with the acceptable entries for those columns, but Numbers does not respect those.  When the user touches any of the commented column heading cells, a context menu appears instead of the comment.
    What must I do in the Excel workbook sheets, or what settings can be made in Numbers to correct the above?

    I imported a Numbers '09 file into Numbers on the iPad.  All comments were removed during import. Frozen header row and column were retained.
    Thank you for your responses I must ask, however, when you refer to "importing" the Excel file, are you referring to a two step process whereby the Excel file is first converted by some other process into Numbers format, then opened in the Numbers application - which is what I have to do in my PC application to generate the Excel file, and reverse that process to convert the Excel back into my database format - or are you simply referring to opening the file in Numbers as "importing" it?  And please excuse any ignorance, as I'm not at all familiar with Apple's terminologies.  In fact, I don't own an iPad myself, but rather I have to depend on one of my clients to do the testing for me.
    I imported an XLSX file into Numbers on the iPad.  The file used "freeze panes" to "freeze" the first column and row. Only warning on import was that it changed fonts. It imported without the first row and column frozen and with no comments. Nothing I can do about the missing comments but it was a simple matter to turn the first column & row into headers and freeze them.
    Unfortunately this would not be an efficient  solution, since the end users are, for the most part, elderly political campaign volunteers who are fairly computer illiterate.  These workbooks are actually canvassing lists - known as walklists.  Their purpose is for the volunteers to interview voters, record the results of the interviews, and post the results to a database, which provides the campaigns with valuable strategizing capabilities.  Also, these workbooks have multiple pages - as many as 10 or more.  and from what I infer from the above, the setting changes would have to be made on each page.
    My whole intent in developing this iPad/Tablet methodology was to significantly reduce volunteer's work - which is a recruitment benefit - and eliminate paper.  While the latter would be accomplished, the former would not, and in fact would tend to increase it.  It's necessary to keep the first row - column headings - and the first column - the route identifier - from scrolling off the page, so that the volunteer won't have to keep scrolling up and down and right and left to know what the data are.
    Conclusion: Comments are not supported on the iPad version of Numbers.  Frozen headers are not imported from Excel but can be recreated easily.
    I was previously directed to the Apple website  http://www.apple.com/ipad/from-the-app-store/apps-by-apple/numbers.html which extols the wonders of the Numbers application.  About halfway down the page there's a section regarding, "Sliders steppers and pop-ups".  The web page states that pop-ups can be set up but, being a marketing site, gives no indication whatsoever as to how it's done.  I was hoping someone could tell my if there's any way to carry them over from an Excel file.

  • Creating Contact Sheets by selecting images in sub-folders

    I'm new to scripting, so not sure whether this is within the realms of possiblity, but hope that there's an expert out there up to the challenge!
    My goal is to develop a script to automate the process of creating contact sheets for each pupil of a school photoshoot.  The folder structure being used presently is:
    1st level folder:     School name (e.g. "Southbridge School")
    2nd level folders:     Class teachers name (e.g. "Smith")
    In each 2nd level folder (i.e. representing each class) there are always 3 images per child (post processed, so ready to convert to contact sheets).  The image numbers run sequentially, so the first 3 image numbers in the folder are of the 1st child, the next 3 are of the 2nd child, and so on....
    The script I'm looking for would allow me to point Photoshop to the 1st level folder and then automatically create a contact sheet for all children 'found' in the sub-folders.  To do this the script would need to do the following:
    Taking each 2nd level folder in turn, recognise each 'child' is represented by 3 consecutive images - and starting with the 1st 3 images in the folder create a contact sheet.  Then, move on to the next 3 images in sequence and create the next contact sheet, and finish after it completes the final 3 images in the folder.  Then, move on to the next 2nd level folder...
    Create each contact sheet with the 3 images in colour and then the same 3 images in black and white (so 6 images per contact sheet), including the image number under each and a copyright watermark
    Save all contact sheets generated from all of the classes all together in 1 new folder at the 2nd level called "Contact Sheets"
    Give each contact sheet a unique name in the format "<Class teachers name> - xxx"   (e.g. "Smith-1", "Smith-2" etc...)
    So, are there any Photoshop masters out there up to this challenge?!  Your help would be greatly appreciated because the learning curve on this one looks v. steep!
    Alternatively, if you can think of a better way of doing this I would also be keen to hear!
    Thanks

    Awesome! I didnt even know aperture could do that
    Now another quick question on this topic, if im using RAW files, does aperture need to convert the file to jpeg or tiff (like it does if you export version as jpeg)?
    If it does, that may be a problem as it takes forever for aperture on my macbook to convert raws and save as jpegs, like a good minute or two per photo, and if i have 200odd photos....not good, people will crack it waiting and leave.
    Or does it print as raw? Cause im pretty sure my printer (or any printer) can not print raw files. Will try it tonight on my printer but a heads up will be useful.
    I could just shoot in hi-res jpeg, but id rather shoot raw incase they want a large poster size print etc.
    Thanks.

  • Autocad 2010 drawing pasted in microsoft excel 2007 spread sheet not visible after converting excel

    Hello, I am having an issue with Autocad 2010 drawings not showing up in a pdf document. Normally, I cut and paste part of an Autocad 2010 drawing into a Microsoft Excel 2007 spread sheet. Then, using Adobe Distiller, I convert the Excel spread sheet into a pdf document for propriatary purposes. However, recently the drawing pasted into Excel will not fully appear on the pdf, the drawing is cut off past a certain point. The drawing will print normally in Excel, but in pdf will not print normally. If the drawing is shrunk below the "cut off" point, it appears normally. If the drawing is expanded above the "cut off" point, any additional image is lost. Any suggestions on how to fix the problem would be appreciated.

    See "[Creating, Editing & Exporting PDFs] How to correct bad PDFdisplay
    of Excel 2007 graph-Adobe ProX?" and similar discussions.  Are you
    scaling it to less than 100%?
    Jeffry Calhoun
    Workforce Analytics Manager
    Ohio Department of Job & Family Services
    P.O. Box 1618, Columbus, OH 43216-1618
    InterAgency: F376, 4020 E. 5th Avenue
    614-644-0564
    Fax 614-728-5938
    [email protected]
    OhioMeansJobs.com -
    The next best thing to having an HR department.
    OhioMeansJobs.com -
    Ohio's premier website for connecting businesses and job seekers -
    quickly, easily, and for free!
    >>> jblairdynis <[email protected]> 4/19/2012 10:44 AM >>>
    autocad 2010 drawing pasted in microsoft excel 2007 spread sheet not
    visible after converting excel created by jblairdynis (
    http://forums.adobe.com/people/jblairdynis ) in Creating, Editing &
    Exporting PDFs - View the full discussion (
    http://forums.adobe.com/message/4346704#4346704 )
    Hello, I am having an issue with Autocad 2010 drawings not showing
    up in a pdf document. Normally, I cut and paste part of an Autocad 2010
    drawing into a Microsoft Excel 2007 spread sheet. Then, using Adobe
    Distiller, I convert the Excel spread sheet into a pdf document for
    propriatary purposes. However, recently the drawing pasted into Excel
    will not fully appear on the pdf, the drawing is cut off past a certain
    point. The drawing will print normally in Excel, but in pdf will not
    print normally. If the drawing is shrunk below the "cut off" point, it
    appears normally. If the drawing is expanded above the "cut off" point,
    any additional image is lost. Any suggestions on how to fix the problem
    would be appreciated.
    Replies to this message go to everyone subscribed to this thread, not
    directly to the person who posted the message. To post a reply, either
    reply to this email or visit the message page:
    http://forums.adobe.com/message/4346704#4346704
    To unsubscribe from this thread, please visit the message page at
    http://forums.adobe.com/message/4346704#4346704. In the Actions box on
    the right, click the Stop Email Notifications link.
    Start a new discussion in Creating, Editing & Exporting PDFs by email (
    mailto:discussions-community-acrobat-creating__editing_%[email protected]
    ) or at Adobe Forums (
    http://forums.adobe.com/choose-container!input.jspa?contentType=1&containerType=14&contain er=4697
    For more information about maintaining your forum email notifications
    please go to http://forums.adobe.com/message/2936746#2936746.
    Ohio Means Jobs
    You're looking for something unique. Use more than an ordinary site.
    http://www.ohiomeansjobs.com
    This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain private, confidential, and/or privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. If you are not the intended recipient, employee, or agent responsible for delivering this message, please contact the sender by reply e-mail and destroy all copies of the original e-mail message.

  • Converting mutiple excel workbooks

    I use Acrobat 8 standard edition.
    We successfully convert an existing single excel workbook
    with 18 TABS into a single PDF document. One of these TABS has
    hyperlinks to other TABS in the same workbook. When we convert to
    PDF the links work as expected and we can jump around the PDF using
    them.
    We now want to convert a series of multi-tab workbooks into a
    single PDF document. OK we could combine several PDF's onto one I
    know, but the snag is that the first excel workbook is to contain
    hyperlinks to TABS in one or more of the other workbooks, so that
    when we convert to PDF these links should jump to various parts of
    the final PDF.
    Any ideas.

    Check that you are not using VBA to protect the workbook on Open. This takes much longer in Excel 2013. 
    It would be code similar to this:
    Sub protectSheets()
    Dim i As Long
        For i = 1 To Sheets.Count
            Sheets(i).Protect Password:="password", userinterfaceonly:=True 
        Next i
    End Sub
    Check out this Link here:
     http://office.microsoft.com/en-ca/access-help/office-2013-known-issues-HA102919019.aspx
    Excel
    Protecting sheets takes longer
    Protecting sheets takes much longer than in previous Excel versions. It’s not noticeable when you’re manually protecting a sheet, but if you have code that protects or unprotects sheets repeatedly, it can become a performance issue.
    The delay is caused by increased security in Excel 2013 for password protected files, because it uses a stronger hashing algorithm (SHA-512). In Office 2010 the default hashing algorithm for password protected files is SHA1. This change makes Excel password
    protected workbooks more secure than they were in previous versions, but can cause a performance issue for some Office Developers.
    Workaround This is by design so there is no workaround.
    Andy Houghton

  • How to download multiple sheets in one excel workbook

    Hi All,
            I have requirement to download multiple sheets in excel workbook. I had
    successfully downloaded multiple sheets in excel. But it was downloaded only in
    my desktop. My requirement is user selects the path and i have to download the
    data in specified path.
    Could you please help me on this?
    Thanks in Advance,
    Basha Shaik

    >>My requirement is user selects the path and i have to download the
    data in specified path.
    For this..use CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
      EXPORTING
        WINDOW_TITLE         = TITLE
       DEFAULT_EXTENSION    =
       DEFAULT_FILE_NAME    =
       WITH_ENCODING        =
        FILE_FILTER          = '.|.'
       INITIAL_DIRECTORY    =
       PROMPT_ON_OVERWRITE  = 'X'
      CHANGING
        FILENAME             = W_FNAME
        PATH                 = W_FILEPATH
        FULLPATH             = W_FULLPATH
       USER_ACTION          =
       FILE_ENCODING        =
      EXCEPTIONS
        CNTL_ERROR           = 1
        ERROR_NO_GUI         = 2
        NOT_SUPPORTED_BY_GUI = 3
        others               = 4.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF NOT W_FULLPATH IS INITIAL.
      FILE_NAME = W_FULLPATH.
    ENDIF.
    regards,
    priya.

  • How can I convert an entire excel workbook to pdf?

    How can I convert an entire excel workbook to pdf?  I have the box in the preferences for converting excel files marked to convert the entire workbook.  I am using Abobe Acrobat 11 Statndard.  This previously worked fine when I was using Adboe Acrobat 10 Statndard.  Now in order to convert the entire workbook I have to open the excel file, Highlight all the workbook tabs and then save the file.  Any ideas?

    In Acrobat click Edit | Preferences | Convert to PDF: select Microsoft Office Excel, then click on Edit Settings.  Make sure that 'Convert entire Excel workbook' is checked.

  • I am uploading an Excel Workbook (xlsx format) to convert to a pdf and it has taken over an hour and it is still not uploading. I have even tried to restart it and that did not work.

    I'm trying to upload an Excel Workbook (in xlsx format) to have it converted to a PDF file and that little circle has been spinning forever. I tried to restart the process but it did the same thing. So I tried to open up each individual worksheet of the workbook and save them individually. I "think" I got that to work, but when I go to the combine tab, I see the four pages that I have selected with spinning "thinking" circles on all of them. Please help. I have a client waiting for this proposal and I don't know what to do!
    LisaWoz

    Hi Lisa Wozniak,
    Are you on a slow Network Connection? I would recommend you to Clear the browser Cache and History and  then try again or try using a different browser on a different Network Connection.
    Let me know if it works or not.
    Regards,
    Rahul Tyagi

  • When I download an excel spread sheet from a Ford web site I seem to be getting code and not the work sheet. Example- MIME-Version: 1.0 X-Document-Type: Workbook Content-Type: multipart/related; boundary="====Boundary===="

    I have a Macbook Air. I have MS office installed and work in Excel often with no issues. But When I download an excel spread sheet from a Ford web site I seem to be getting code and not the work sheet.
    Example-
    MIME-Version: 1.0
    X-Document-Type: Workbook
    Content-Type: multipart/related; boundary="====Boundary===="
    --====Boundary====
    Content-Location: file:///C:/HOLD.XHT
    Content-Transfer-Encoding: 8bit
    Content-Type: text/html; charset="utf-8"
    <html xmlns:v="urn:schemas-microsoft-com:vml"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns="http://www.w3.org/TR/REC-html40">
    <HEAD>
    <meta name="Excel Workbook Frameset">
    <xml>
    <x:ExcelWorkbook>
      <x:ExcelWorksheets>
       <x:ExcelWorksheet>
        <x:Name>BTB</x:Name>
        <x:WorksheetSource HRef="./IBIT0001.xht"/>
       </x:ExcelWorksheet>
       <x:ExcelWorksheet>
        <x:Name>GSM</x:Name>
        <x:WorksheetSource HRef="./IBIT0002.xht"/>
       </x:ExcelWorksheet>
       <x:ExcelWorksheet>
        <x:Name>RODetail</x:Name>
        <x:WorksheetSource HRef="./IBIT0003.xht"/>
       </x:ExcelWorksheet>
      </x:ExcelWorksheets>
    </x:ExcelWorkbook>
    </xml>
    </HEAD>
    </HTML>
    --====Boundary====
    Content-Location: file:///C:/IBIT0001.xht
    Content-Transfer-Encoding: 8bit
    Content-Type: text/html; charset="utf-8"
    <html xmlns:v="urn:schemas-microsoft-com:vml"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns="http://www.w3.org/TR/REC-html40">
    <HEAD>
    <meta http-equiv=Content-Type content="text/html; charset=utf-8">
    <style>
    <!--table
            {mso-displayed-decimal-separator:"\.";
            mso-displayed-thousand-separator:"\,";}
    @page
            {margin:1.0in .75in 1.0in .75in;
            mso-header-margin:.5in;
            mso-footer-margin:.5in;
            mso-page-orientation:landscape;}
    tr
            {mso-height-source:auto;}
    col
            {mso-width-source:auto;}
    br
            {mso-data-placement:same-cell;}
    .style21
            {color:blue;
            font-size:10.0pt;
            font-weight:400;
            font-style:normal;
            text-decoration:underline;
            text-underline-style:single;
            font-family:Arial;

    Try search/ask in the forum devoted entirely to Excel issues:
    http://answers.microsoft.com/en-us/mac/forum/macexcel

  • After saving a pdf as Excel workbook the numbers remain text and cannot be used in calculations. Is there a better way to convert into real digital numbers?

    After saving a pdf as Excel workbook the numbers remain text and cannot be used in calculations. Is there a better way to convert into real digital numbers?
    I have tried to convert the pdf to Word instead but same difficulty with numbers: look like numbers but not usable for calculations

    Excel has a 'text to numbers' function, I would use that.
    Convert text to numbers. Microsoft Excel.

  • How to convert Oracle Report Output to Excel Spread Sheet..

    Hello Sir,
    How to convert Oracle Report Output to Excel Spread Sheet..
    Thanks..

    Hello,
    Please give us more information what kind of report(s). Sample example etc.,
    Sri

  • After I covert my excel file to PDF, my images are cut off or not appearing at all HELP?!

    Hello!
    I am creating a Exel Work book and converting it to a PDF file (easy to share online).
    Once I convert the Excel Work book, some of my images are cut off or not appearing at all.
    Which I find weird because some images pop up just fine.
    These images are originally flats from Adobe Illustrator I converted to pictures with Excel.
    So why is that when I convert my workbook to a PDF file some images show through and others don't?
    Please Help!
    ORIGINAL EXCEL FILE
    Once I save it as a PDF File. Other pages are fine except this one?

    Correction for above: 'Bit depth' not ' Bid depth'

  • Converting excel file to PDF using Adobe 9 standard on windows XP

    I have installed office 2010 SP1 on a computer and it already has adobe 9 installed. user never had problem with converting multi sheet excel workbook to PDF using MSoffice 2003.
    Now, when we open excel files in EXCEL 2010 then try to print it to adobe 9, it asks for a filename and we type a name and it convert the first 2 sheet and then it asks again for the other filename and if we enter other name it print other sheets into second file. so basically it splits to 2 PDF files for no reason.
    I tested same file on my laptop with windows 7 and adobe standard 9 and office 2010  and i got same result.
    anybody knows what is the issue?

    Have you updated Acrobat? Have you tried printing to another file format just to see if it is an issue with Acrobat or OFFICE 2010. OFFICE 2010 has forced many folks to upgrade to AA X to obtain compatibility.

  • JAVA code to Convert Excel file To XML file

    Hi,
    I am new to java ,Any one please share me the code to convert Excel file in to xml file.
    Thanks in advance.

    Here is a sample code for reading an Excel file. It uses JExcel API:
    package com.quicklyjava;
    import jxl.*;
    import jxl.read.biff.BiffException;
    import java.io.File;
    import java.io.IOException;
    public class JavaExcelRead {
    * @param args
    public static void main(String[] args) {
    try {
    //Create a workbook object from the file at specified location.
    //Change the path of the file as per the location on your computer.
    Workbook wrk1 = Workbook.getWorkbook(new File("C:/test.xls"));
    //Obtain the reference to the first sheet in the workbook
    Sheet sheet1 = wrk1.getSheet(0);
    //Obtain reference to the Cell using getCell(int col, int row) method of sheet
    Cell colArow1 = sheet1.getCell(0, 0);
    Cell colBrow1 = sheet1.getCell(1, 0);
    Cell colArow2 = sheet1.getCell(0, 1);
    //Read the contents of the Cell using getContents() method, which will return
    //it as a String
    String str_colArow1 = colArow1.getContents();
    String str_colBrow1 = colBrow1.getContents();
    String str_colArow2 = colArow2.getContents();
    //Display the cell contents
    System.out.println("Contents of cell Col A Row 1: \""+str_colArow1 + "\"");
    System.out.println("Contents of cell Col B Row 1: \""+str_colBrow1 + "\"");
    System.out.println("Contents of cell Col A Row 2: \""+str_colArow2 + "\"");
    } catch (BiffException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    You can further process this to convert the data extracted into XML. Hope this helps!

  • Error 97 when opening existing Excel workbook

    I have a LabVIEW application that reads environmental data from two transmitters and writes the data to two sheets of an Excel workbook (this is done using ActiveX).  I have run the application successfully on my computer and a laptop, both of which are running Windows XP and Office 2003.  After installing the application on the computer that we want to use for the actual test, however, a problem was observed.  If we attempt to open an existing Excel file (which is what we need to do), LabVIEW generates an error 97 message (null reference) and the program does not run.  This computer is running Excel 2000.  I checked the registry settings for Excel per a similar discussion and found no problems.  Opening a new Excel file works fine.  Thanks.

    Hello,
    A few things come to mind:
    1. I wonder if the excel version matters here.  Could it be that you have a different version of the activeX control on your target machine?
    2. Posting a minimal, simplified version of your code may help as well... so we can see precisely where the error occurs.  Maybe just the open operation and if relevant the ActiveX property node from which you are receiving the error - identifying precisely where the error originates will be helpful.
    3. Here is another thread addressing the same error that may be helpful to you:
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=172065
    Give it a thorough read just to make sure you're not having a similar issue - if you are, you just may have the solution!
    I hope this helps!
    JLS
    Best,
    JLS
    Sixclear

Maybe you are looking for

  • My ipod only works on my docking station. Any help would be great!

    I have a 4GB ipod I got in Dec. and I got a docking station in May and I use them all the time. Well I left my ipod plugged into the docking station for a couple days, and it works fine on it, but when I tried to connect my ipod to my computer,it jus

  • HR Report using ABAP OO

    I am a classic HR ABAP programmer.  I want to practice/learn more about ABAP OO.  I would like to try and convert a classic HR program which uses the PNP logical DB and macros to retrieve HR infotype records to ABAP OO.  I have searched some, but hav

  • How to install Software Deployment Manager

    Hi!, I have downloaded the PDK files and want to deploy it? How do I deploy them? As per help I need SDM ( Software Deployment manager to deploy this files, from where I will get software deployment manager and how to use SDM to deploy PDK files...pl

  • XFCE Clipboard

    I use Xfce 4.4 and I hate its clipboard because I can't call the list of stored items with keys and because often I have to select manually even the last pasted entry... I'd like to have some info about how to replace it. Thanks

  • Imac came with moutain lion can i transfer this onto my macbook

    hi i bought imac this year with moutain lion on the system, i also have a macbook pro with snow leopard and would like to put mountain lion on this also, now can i somehow get it from computer to macbook or do i have to download it in app store? ther