Auf Thema antworten

Ich habe es jetzt mit hilfe irgendwelcher Japanischen Seiten geschafft werte in die Tabelle zu schreiben ^^


[code=Java]public class OleExcel extends OleClientSite {



    public static final String ID = "ExcelSheet";

    private static final int CELL_VALUE_ID = 0x00000006;

    private static final int CELL_ID = 0x000000c5;

    private static final int SHEET_ID = 0x000001e5;

    private OleAutomation cell;



    public OleExcel(Composite parent, int style, File file    ) {

        super(parent, style, file);


        OleAutomation workbook = new OleAutomation(this);

        OleAutomation worksheet = workbook.getProperty(SHEET_ID,

                new Variant[] { new Variant(1) }).getAutomation();


   

            cell = worksheet.getProperty(CELL_ID,new Variant[] { new Variant("A1") }).getAutomation();

            cell.setProperty(CELL_VALUE_ID, new Variant("Testeintrag"));



    }


}[/code]


Allerdings würde ich das Ganze eher im Stil ""..getIDsOfNames(new String[] { "ActiveSheet" }" aufziehen - ich komme da nur absolut nicht weiter..


Zudem hab ich das Problem, dass ich in ein bestimmtes Tabellenblatt springen möchte, um dort hineinzuschreiben. Kann mir da jemand helfen?


Gruß,


tech



Oben