Hey hi
i trying out this example in this its not working
*SpreadSheet.Sheet.Column.*
*setWidth(Number); *even though i had added the v1.3 library, can u please
help me out in this. For below example i am trying to add.
in this i want to increase the width of the cell.




import java.awt.Color;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;

import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

import org.jopendocument.dom.ODDocument;
import org.jopendocument.dom.OOUtils;
import org.jopendocument.dom.spreadsheet.Column;
import org.jopendocument.dom.spreadsheet.SpreadSheet;
import org.jopendocument.dom.spreadsheet.Table;


public class Test12 {

    /**
     * @param args
     */
    public static void main(String[] args) {

        final Object[][] data = new Object[6][2];
          data[0] = new Object[] {
"Januaryajdfa;lsdkfjakdsfmasldkf;asjdflkasj;d", 1 };
          data[1] = new Object[] { "February", 3 };
          data[2] = new Object[] { "March", 8 };
          data[3] = new Object[] { "April", 10 };
          data[4] = new Object[] { "May", 15 };
          data[5] = new Object[] { "June", 18 };

          String[] columns = new String[] { "Month", "Temp" };


          TableModel model = new DefaultTableModel(data, columns);

          // Save the data to an ODS file and open it.
          final File file = new File("temperature.ods");
          try {
            SpreadSheet.createEmpty(model).saveAs(file);

             OOUtils.open(file);
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }




    }

}


*Abhijeet D. Mote*
Mobile No: (+91)-9773314334
[email protected]
[email protected] <[email protected]>


On Fri, May 9, 2014 at 12:21 AM, abhijeet mote <[email protected]>wrote:

> Hey hi...
> Thanks for the reply. I will see today only and try to apply in my
> project. thanks once again from ourGNUKhata team and one of the problem in
> our report would be solved our GNUKhata team would be happy for this
> On 08-May-2014 9:15 PM, "Anton Lukashchuk" <[email protected]> wrote:
>
>> Hi, You can adjust width of a column, there's a method
>> SpreadSheet.Sheet.Column.setWidth(Number);
>> But be sure You use v1.3 library, as it doesn't work in v1.4 rc1, because
>> of wrong method signature.
>>
>> To change the
>>
>> On Wednesday, April 23, 2014 8:14:22 AM UTC+3, abhijeet mote wrote:
>>>
>>> Hello please let me know how to increase the size of the cell width and
>>> height as per cell. i want its wrapped according to the text.
>>>
>>  --
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "jOpenDocument" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/jopendocument/Vv_mmPt21ck/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"jOpenDocument" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to