The code is shown only partly, the complete code is in the zip-file.
DECLARE -- test_21.sql v_fileHandle utl_file.FILE_TYPE; r_font xml_spreadsheet.t_rec_font; r_customStyles xml_spreadsheet.t_rec_customStyles; tab_customStyles xml_spreadsheet.t_tab_customStyles; BEGIN -- Bold text r_customStyles.id := 's50'; r_customStyles.type := 'Text'; r_font.fBold := TRUE; r_customStyles.font := r_font; tab_customStyles(1) := r_customStyles; -- Reset Style to default because record is used for further styles r_font.fBold := NULL; ... -- italic bold r_customStyles.id := 's50'; r_font.fItalic := TRUE; r_font.fBold := TRUE; r_customStyles.font := r_font; tab_customStyles(9) := r_customStyles; -- New File v_fileHandle := xml_spreadsheet.createNewFile('DOC','test_20.xml'); -- open first worksheet xml_spreadsheet.newWorksheet( v_fileHandle ,'Textvariations' ); -- Write a data row xml_spreadsheet.writeData(v_fileHandle,'Bold','s50'); xml_spreadsheet.writeData(v_fileHandle,'Italic','s51'); xml_spreadsheet.writeData(v_fileHandle,'Crossed out','s52'); -- New data row xml_spreadsheet.newDatarow(v_fileHandle); ... xml_spreadsheet.writeData(v_fileHandle,'Double underlined supercript','s57'); xml_spreadsheet.writeData(v_fileHandle,'Italic bold','s59'); ... -- close worksheet xml_spreadsheet.closeWorksheet( v_fileHandle ,0 ); -- Close file xml_spreadsheet.closeFile(v_fileHandle); END; /
Excel | OO-Calc |
---|---|
Click on images to enlarge |