the crude code below I am using to create a worksheet and formatting it and its not working
what its supposed to do is create a workbook, format it to be all cells to contain text, aligned to TOP and Left, and then I want to paste to cell (A1) what is in the copyboard - running this via Quicktest Professional so it should be close to visualbasicscript (I can convert from vba I guess).
can anybody correct this?
what its supposed to do is create a workbook, format it to be all cells to contain text, aligned to TOP and Left, and then I want to paste to cell (A1) what is in the copyboard - running this via Quicktest Professional so it should be close to visualbasicscript (I can convert from vba I guess).
can anybody correct this?
Code:
[COLOR=#000080][B]Set[/B][/COLOR] oEngine [COLOR=#000000]=[/COLOR] [COLOR=#000080][B]CreateObject[/B][/COLOR][COLOR=#000000]([/COLOR][COLOR=#800000]"Excel.Application"[/COLOR][COLOR=#000000])[/COLOR]
oEngine.Workbooks.Add
[COLOR=#000080][B]Set[/B][/COLOR] objSheet [COLOR=#000000]=[/COLOR] oEngine.Sheets.Item[COLOR=#000000]([/COLOR][COLOR=#800000]1[/COLOR][COLOR=#000000])[/COLOR]
oEngine.Sheets.Item[COLOR=#000000]([/COLOR][COLOR=#800000]1[/COLOR][COLOR=#000000])[/COLOR].[COLOR=#000080][B]Select[/B][/COLOR]
[COLOR=#000080][B]With[/B][/COLOR] ActiveWorkbook.Styles[COLOR=#000000]([/COLOR][COLOR=#800000]"Normal"[/COLOR][COLOR=#000000])[/COLOR].NumberFormat [COLOR=#000000]=[/COLOR] [COLOR=#800000]"@"[/COLOR]
[COLOR=#000080][B]End[/B][/COLOR] [COLOR=#000080][B]with[/B][/COLOR]
[COLOR=#000080][B]With[/B][/COLOR] objSheet
[COLOR=#008000][I]' .Styles("Normal").NumberFormat = "@"[/I][/COLOR]
.Name [COLOR=#000000]=[/COLOR] [COLOR=#800000]"AU-AAPSQLUAT005"[/COLOR]
.HorizontalAlignment [COLOR=#000000]=[/COLOR] xlCenter
.Range[COLOR=#000000]([/COLOR][COLOR=#800000]"A1:A1"[/COLOR][COLOR=#000000])[/COLOR].Text
.Range[COLOR=#000000]([/COLOR][COLOR=#800000]"A1"[/COLOR][COLOR=#000000])[/COLOR].Value [COLOR=#000000]=[/COLOR] [COLOR=#800000]"dbo.chClient_vW "[/COLOR]
.Range[COLOR=#000000]([/COLOR][COLOR=#800000]"A2"[/COLOR][COLOR=#000000])[/COLOR].Value [COLOR=#000000]=[/COLOR] [COLOR=#800000]"Test Start Time: "[/COLOR]
[COLOR=#000080][B]End[/B][/COLOR] [COLOR=#000080][B]with[/B][/COLOR]
[COLOR=#000080][B]Set[/B][/COLOR] objSheet [COLOR=#000000]=[/COLOR] oEngine.Sheets[COLOR=#000000]([/COLOR][COLOR=#800000]"AU-AAPSQLUAT005"[/COLOR][COLOR=#000000])[/COLOR]