CrazyEngineers
  • Convert data from jpg to excel

    Pooja ShreeVatsa

    Pooja ShreeVatsa

    @pooja-shreevatsa-9yFvbt
    Updated: Oct 26, 2024
    Views: 1.4K
    I have few Data in Jpg I want to convert into excel....I wrote code but its not working 😔....someone Help me pls....
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Kaustubh Katdare

    AdministratorMar 8, 2015

    Pooja ShreeVatsa
    I have few Data in Jpg I want to convert into excel....I wrote code but its not working 😔....someone Help me pls....
    Curious to know if you are actually trying to convert data available in an image (.jpg) to an excel file? If yes, please share the code you've written so far so that the experts here can help you fix it.

    PS: Please create a new discussion for every new topic that you wish to discuss.
    Are you sure? This action cannot be undone.
    Cancel
  • Koushal Patel

    MemberMar 8, 2015

    Interesting!
    I have not tried though, found below links
    1. #-Link-Snipped-#
    2. #-Link-Snipped-#

    I will try to do this stuff once I get time, meanwhile, if anyone can pitch in with their idea, we would love to hear.
    Are you sure? This action cannot be undone.
    Cancel
  • Pooja ShreeVatsa

    MemberMar 8, 2015

    Kaustubh Katdare
    Curious to know if you are actually trying to convert data available in an image (.jpg) to an excel file? If yes, please share the code you've written so far so that the experts here can help you fix it.

    PS: Please create a new discussion for every new topic that you wish to discuss.
    Kaustubh Katdare
    Curious to know if you are actually trying to convert data available in an image (.jpg) to an excel file? If yes, please share the code you've written so far so that the experts here can help you fix it.

    PS: Please create a new discussion for every new topic that you wish to discuss.
    This s ma code .....
    import java.io.FileOutputStream;
    import com.itextpdf.text.Document;
    import com.itextpdf.text.pdf.PdfWriter;
    import com.itextpdf.text.Image;
    
    
    public class ImageToPDF {
      public static void main(String ... args) {
        Document document = new Document();
        String input = "c:/temp/capture.png"; // .gif & .jpg
        String output = "c:/temp/capture.pdf"; // png to pdf(output file)
        try {
          FileOutputStream fos = new FileOutputStream(output);
          PdfWriter writer = PdfWriter.getInstance(document, fos);
          writer.open();
          document.open();
          document.add(Image.getInstance(input));
          document.close();
          writer.close();
        }
        catch (Exception e) {
          e.printStackTrace();
        }
      }
    }
    
    Are you sure? This action cannot be undone.
    Cancel
  • Pooja ShreeVatsa

    MemberMar 8, 2015

    Kaustubh Katdare
    Curious to know if you are actually trying to convert data available in an image (.jpg) to an excel file? If yes, please share the code you've written so far so that the experts here can help you fix it.

    PS: Please create a new discussion for every new topic that you wish to discuss.
    Can i Try it in Base64 String?...will i get proper output...
    Are you sure? This action cannot be undone.
    Cancel
  • Manish Goyal

    MemberMar 9, 2015

    I will suggest you following to debug this problem

    1st create a simple program to create a basic PDF through Java

    Below is working code

    <a href="https://www.avajava.com/tutorials/lessons/how-do-i-write-to-a-pdf-file-using-itext.html" target="_blank" rel="nofollow noopener noreferrer">How do I write to a PDF file using iText? - Web Tutorials - avajava.com</a>

    2: Write a Program to read data from Image, I think a simple read operation should work.

    3: Then merge both program and try to understand what is going wrong at every single point

    Just check if input is coming correctly or not
    Are you sure? This action cannot be undone.
    Cancel
  • Pooja ShreeVatsa

    MemberMar 9, 2015

    Manish Goyal
    I will suggest you following to debug this problem

    1st create a simple program to create a basic PDF through Java

    Below is working code

    <a href="https://www.avajava.com/tutorials/lessons/how-do-i-write-to-a-pdf-file-using-itext.html" target="_blank" rel="nofollow noopener noreferrer">How do I write to a PDF file using iText? - Web Tutorials - avajava.com</a>

    2: Write a Program to read data from Image, I think a simple read operation should work.

    3: Then merge both program and try to understand what is going wrong at every single point

    Just check if input is coming correctly or not
    Thank you soo Much for your help....I ll try this..
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register