Tutorials

Tutorial

Text formatting

Deutsche Version

Misc font formats

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;
/
Results for Test 21
ExcelOO-Calc
MS-Excel Output für Test 21 OO-Calc Output für Test 21

Click on images to enlarge

Differences

  • Excel underlines only the first line of a wrapped text when "underline accounting" is choosen. Also the lines are set further apart from the text.
  • OO Calc shows not differences between "underline" and "underline accounting".
  • Excel sets the lines for underlined superscript text at the level of normal text, OO-Calc raises the lines together with the text.