help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem when writing a cell array( char and numeric data) to excel(.


From: Tatsuro MATSUOKA
Subject: Re: Problem when writing a cell array( char and numeric data) to excel(.xlsx) file
Date: Sat, 21 Jun 2014 07:27:52 +0900 (JST)




----- Original Message -----
> From: Tatsuro MATSUOKA 
> To: rcharan51 
> Cc: 
> Date: 2014/6/20, Fri 18:10
> Subject: Re: Problem when writing a cell array( char and numeric data) to 
> excel(.xlsx) file
> 
> ----- Original Message -----
> 
>>  From: rcharan51 
>>  To: address@hidden
>>  Cc: 
>>  Date: 2014/6/20, Fri 16:01
>>  Subject: Re: Problem when writing a cell array( char and numeric data) to 
> excel(.xlsx) file
>> 
>> t his is my input file
>>  (http://octave.1599824.n4.nabble.com/file/n4664883/input.xlsx) this is my
>>  code  inputcrctnbldg.m
>>  <http://octave.1599824.n4.nabble.com/file/n4664887/inputcrctnbldg.m
> 
>>  and my problem is stille there while opening the created excel file and it
>>  shows errors like  above uploaded images
>> 
> As in the below,  
> http://octave.1599824.n4.nabble.com/Re-installing-java-and-apache-for-using-spreadsheet-I-O-td4664767i20.html#a4664884
> 
> 
> Markus says that
> indeed, this seems to be a bug. I try to a look on weekend on it.
> 
> so that your effort is meaningless before the bug will be fixed.


I noticed that input.xlsx consists of 5 sheets
(bldg-1, bldg-2, Bldg-final, Tunnel data, and Bldg-with basement) 

Which one do you want to manipulate?

I assume that 'Bldg-with basement' is that you want manipulate because it is 
active in the excel file.

Save data as 'input.txt' and read data using importdata as:

octave:18> a = importdata('input.txt','\t')
a =

  scalar structure containing the fields:

    data =

     Columns 1 and 2:

          1.0000 +    0.0000i   3833.0000 +    0.0000i
          2.0000 +    0.0000i   3832.0000 +    0.0000i
          3.0000 +    0.0000i   3831.0000 +    0.0000i
          4.0000 +    0.0000i   3699.0000 - 3701.0000i
          5.0000 +    0.0000i   3814.0000 +    0.0000i
          6.0000 +    0.0000i          NA +    0.0000i
          7.0000 +    0.0000i   3630.0000 +    0.0000i
          8.0000 +    0.0000i   3454.0000 +    0.0000i

     Columns 3 and 4:

              NA +    0.0000i   6087.0000 +    0.0000i
              NA +    0.0000i   6087.0000 +    0.0000i
              NA +    0.0000i   6072.0000 +    0.0000i
              NA +    0.0000i   5845.0000 +    0.0000i
              NA +    0.0000i   6050.0000 +    0.0000i
              NA +    0.0000i   5795.0000 +    0.0000i
              NA +    0.0000i   5653.0000 +    0.0000i
              NA +    0.0000i   5291.0000 +    0.0000i

     Columns 5 and 6:

          3.0000 +    0.0000i      1.0000 +    0.0000i
          4.0000 +    0.0000i      1.0000 +    0.0000i
          5.0000 +    0.0000i      1.0000 +    0.0000i
         12.0000 +    0.0000i      1.0000 +    0.0000i
         24.0000 +    0.0000i      1.0000 +    0.0000i
        285.0000 +    0.0000i      1.0000 +    0.0000i
        293.0000 +    0.0000i      1.0000 +    0.0000i
          1.0000 +    0.0000i      2.0000 +    0.0000i

     Column 7:

          3.0000 +    0.0000i
          3.5000 +    0.0000i
          5.0000 +    0.0000i
          3.0000 +    0.0000i
          3.0000 +    0.0000i
          3.0000 +    0.0000i
          3.0000 +    0.0000i
              NA +    0.0000i

    textdata =
    {
      [1,1] = S.No.     Bldg. No.       Bldg. Name      Chainage        Ref. No.
        No. of Basements        Depth
      [2,1] = JAI HOUSE SHOP
      [3,1] = CAPITAL HOUSE
      [4,1] = ARCHANA ENTERPRISE
      [5,1] = NS MARG DARIYAGANJ
      [6,1] =
      [7,1] =
      [8,1] = "4/5, NS MARG"
      [9,1] = NS MARG
      [10,1] = "SHRI RAGHUNATH MANDIR, DELHI GATE"
      [11,1] =
    }
    colheaders =
    {
      [1,1] = S.No.
      [1,2] = Bldg. No.
      [1,3] = Bldg. Name
      [1,4] = Chainage
      [1,5] = Ref. No.
      [1,6] = No. of Basements
      [1,7] = Depth
    }


The above is a practical solution in the current state.
Of coursbe, this might not be what you want but you can work text based save 
data on excel and manipulate octave I/O functions.  See the octave manual,  
14.1.3 Simple File I/O.

Tatsuro



reply via email to

[Prev in Thread] Current Thread [Next in Thread]