7/6/2010 11:50 PM | |
Joined: 12/11/2009 Last visit: 9/8/2022 Posts: 243 Rating: (4) |
How can I write a time value to excel cell? when I try [code]Excel.Cells(1,1).Value = HMIRuntime.Tags.Item ("TIMETAG").Read[/code] time is T#39m ( as decimal 2340000 ) it writes 2340000. I want like HH:mm:ss ( hours:minutes:seconds) is there easier way or do I have to write script like this in vb instead of c# ? (last picture) http://support.automation.siemens.com/WW/view/en/1138415 ------------------------------------------------------------------------------------ As you know, in a excel file, there can be many pages. when I write [code]Excel.Cells(1,1).Value = HMIRuntime.Tags.Item ("TIMETAG").Read[/code] it writes to first page.. How can I write something to second page? for example first page name is : ab cd second page name is : ef gh ---------------------------------------------------------------------------------- thank you Splitted from Vb code to copy a file. |
Last edited by: O_Moderator at: 9/16/2010 2:26 PMlink edited Last edited by: O_Moderator at: 7/7/2010 11:22 AMnew subject after splitting Last edited by: Osman_ at: 7/7/2010 12:31 AMLast edited by: Osman_ at: 7/7/2010 12:07 AMLast edited by: Osman_ at: 7/7/2010 12:06 AM |
|
7/7/2010 9:03 AM | |
Joined: 1/4/2010 Last visit: 5/2/2024 Posts: 650 Rating: (40)
|
Hi Set objExcelApp = CreateObject("Excel.Application") objExcelApp.Visible = True objExcelApp.Workbooks.Open "C:\excel1.xls" objExcelApp.Cells(4, 3).Value = ScreenItems("IOField12").OutputValue objExcelApp.ActiveWorkbook.Save objExcelApp.Workbooks.Close objExcelApp.Quit Set objExcelApp = Nothing |
Last edited by: Romulus at: 7/7/2010 9:04 AMRegards |
|
This contribution was helpful to3 thankful Users |
7/12/2010 1:52 PM | |
Joined: 1/4/2010 Last visit: 5/2/2024 Posts: 650 Rating: (40)
|
Hi Do you know this threat? /tf/WW/en/Posts/9552 Is there any help for you? |
Regards |
|
This contribution was helpful to1 thankful Users |
Follow us on