Hello,
I would like to create multiple ppt slides out of one excel file. I was able to make a first draft to extract the information from excel, but I struggle to put the information in ppt. Actually I get:
- A memory error in ppt:confused:
- text not on the slide:mad:

Thanks for your support and the tolerance to support in this matter. Since I am new to this, I might be not able to estimate the imapact of some of the terms I have used.
Regards
greenhorn
Enclosed the code I have:

package transferXlsPpt;

Java Code:
// excel imports
import java.awt.Desktop;
import java.io.File;
import java.io.IOException;
import jxl.Cell;
import jxl.CellType;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;

// powerpoint imports
import java.awt.Desktop;
import org.apache.poi.hslf.HSLFSlideShow;
import org.apache.poi.hslf.model.Slide;
import org.apache.poi.hslf.usermodel.RichTextRun;
import org.apache.poi.hslf.usermodel.SlideShow;
import java.io.*;
import java.awt.*;
import org.apache.poi.hslf.model.TextBox;

public class TransferTextBox {
	private String inputFile;
	public void setInputFile(String inputFile) {
		this.inputFile = inputFile;
	}
	public void read() throws IOException  {
		File inputWorkbook = new File(inputFile);
		Workbook w;
		try {
			w = Workbook.getWorkbook(inputWorkbook);
			// Get the first sheet
			Sheet sheet = w.getSheet(0);
					Cell cell = sheet.getCell(1, 1);
					CellType type = cell.getType();
					System.out.println("I got a label "
							+ cell.getContents());
					}
		catch (BiffException e) {
			e.printStackTrace();
		}
	}
	public static void main(String[] args) throws IOException {
		TransferTextBox test = new TransferTextBox();
		test.setInputFile("c:/temp/lars.xls");
		test.read();
		Desktop.getDesktop().open(new File("C:\\temp\\test.pptx"));
		try
		  {  SlideShow slideShow = new SlideShow();
		    Slide slide = slideShow.createSlide();
		    TextBox title = slide.addTitle();
		    title.setText("First Titel");
		    RichTextRun richtextrun = title.getTextRun().
		getRichTextRuns()[0];
		    richtextrun.setFontSize(32);
		    richtextrun.setFontName("Arial");
		    richtextrun.setBold(true);
		    richtextrun.setItalic(true);
		    richtextrun.setUnderlined(true);
		    richtextrun.setFontColor(Color.red);
		    richtextrun.setAlignment(TextBox.AlignRight);   
		    FileOutputStream out = new FileOutputStream
		("colorfulSlideTitle.ppt");
		    slideShow.write(out);
		        out.close();
		  }catch(Exception e){}
		  } 
	}