DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Export Crash analysis HIC value to Excel

Hi.. I was trying to export the HIC, HIC15, HIC36  value to Excel sheet by using Script...  But it doesn't gave me any good result. Please help me...
0 Kudos
Message 1 of 4
(6,446 Views)

The attached VB Script includes an example that transfers a lot of information generated in DIAdem into an Excel spreadsheet. The example can be found in:

Help menu - Examples - Mathematics - Crash Evaluation Based on the MME Standard

There is a lot more code than you need, so you'll have to get rid of some of it, but it works and gives the results you are looking for.

You can run the example in DIAdem first to see how this works and then pick the pieces of the code you want to use.

 

Message Edited by Otmar on 09-19-2007 11:17 AM

Otmar D. Foehner
0 Kudos
Message 2 of 4
(6,432 Views)

Hi sri lankan,

I have reduced and adapted the script example of Otmar a litle bit.
First create and save an Excel file with at least one sheet named "Sheet1".
The following runs a HIC calculation and transfers the HIC results into Sheet1:

Call

ChnHICCalc("XChn","YChn",1,1,1,0,0,0) '... XW,Y,HIC36,HIC15,HICVar,HICUserDef,HICUser,HICd

Dim
oExcel
Set oExcel = CreateObject("Excel.Application")
oExcel.Visible =
True
Dim
sgXlsPath : sgXlsPath = AutoActPath & "HICResults.xls"
Dim oWorkbook : Set oWorkbook = oExcel.Workbooks.Open(sgXlsPath)
Dim oExcelSheet : Set oExcelSheet = oWorkbook.Sheets("Sheet1")
Call oExcelSheet.Select()
oExcelSheet.Cells(
1, 1) = "HIC"
oExcelSheet.Cells(1, 2) = "HIC 36 ms"
oExcelSheet.Cells(1, 3) = "HIC 15 ms"
oExcelSheet.Cells(2, 1) = HICRes(1, 1)
oExcelSheet.Cells(
2, 2) = HICRes(1, 2)
oExcelSheet.Cells(
2, 3) = HICRes(1, 3)
Call MsgBox("Continue")
Set oExcelSheet = Nothing
Set
oWorkbook = Nothing
Set
oExcel = Nothing

I hope this helps.

Christian

0 Kudos
Message 3 of 4
(6,406 Views)
ThanX for the Answers... It's help me lotSmiley Happy
0 Kudos
Message 4 of 4
(6,362 Views)