Extract column headings from Table

Share your programming ideas for various measurement and analysis tasks here
Post Reply
user-6033
Posts: 89
Joined: Thu Jan 01, 1970 1:00 am

Extract column headings from Table

Post by user-6033 »

Hi,

Is there a way to extract the column headings from a Table? Row 0 contains values and I can not find any simple way to get to the headings. I also looked for a way to extract those from from the ias instead but so far I have not succeded.

Best regards
Fredrik Olsson

Edit: No need to answer. I found the solution myself. One may extract the colum names from something like:

temp = Zeiss.Micro.Scripting.Core.ZenAnalyzerWrapper.GetTableStructure(ftable)
cnames = temp.columnNames
for i in range(0,cnames.Count):
print cnames
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Post by user-4 »

Is there a way to extract the column headings from a Table?
This worked for me best:

Code: Select all

table = Zen.Application.ActiveDocument
print table.Columns[0].[B]Caption[/B]
user-6033
Posts: 89
Joined: Thu Jan 01, 1970 1:00 am

Post by user-6033 »

Missed that :rolleyes:

BR
Fredrik Olsson
user-6033
Posts: 89
Joined: Thu Jan 01, 1970 1:00 am

Post by user-6033 »

Hi,
How do I get hold of the column units as well, like [µm]?

Best regards
Fredrik Olsson
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Post by user-4 »

How do I get hold of the column units
Some investigations showed that this is really a missing feature.

We will supply table.Columns[0].ColumnUnit in a future release.
user-4
Posts: 397
Joined: Thu Jan 01, 1970 1:00 am

Post by user-4 »

The ColumnUnit will come with the next Releases (first Zen Core, then Zen Blue)

You will get the unit of a Column as demonstrated in the code below

Code: Select all

table = Zen.Application.ActiveDocument
unit = table.Columns[0].GetColumnUnit()
Thanks for the contribution!
Post Reply