16 posts in this topic
Read out excel to array
How is it possible to read out a Excel file without opening the excel file itself in excel?
With the current posts on the forum it's for me not possible to fix my issue.
I was looking at the Excel.au3 include file but this did not help me.
Could someone help me please?
How to select or delete a column in excel sheet on the basis of heading in the first row
I wrote a script which deletes a single or range of columns from an excel file, however, I found that the file is frequently modified and the automation is not smooth.
The task can be achieved in two ways, please help me in whichever is simple.
1) Instead of column number, I delete single column or range of columns on the basis of heading in the first cell of the column. This way I will be able to select the desired columns even if the column number changes.
2) I select the columns on the basis of heading in the first cell of each column and paste it in a new sheet or new excel file. This way I will get the desired column where ever they are in the file.
Change fontsize and set bold in Excel
How do you set the font size and bold on text in excel by using Autoit?
How to adapt VPageBreak.DragOff Method (Excel)
I want to remove the vertical page breaks so that I have only "page 1" available. Here the link to MSDN how to do it in VBA which works properly: https://msdn.microsoft.com/EN-US/library/office/ff836174.aspx
What I did and doesn't work:
With $oExcel_Export2Excel.Worksheets(1) .VPageBreaks(1).DragOff.Direction = -4161 ;$xlToRight = -4161 .VPageBreaks(1).DragOff.RegionIndex = 1 EndWith Local $aParam = [-4161, 1] $oExcel_Export2Excel.Worksheets(1).VPageBreaks(1).DragOff($aParam) $oExcel_Export2Excel.Worksheets(1).VPageBreaks(1).DragOff(-4161, 1) $oExcel_Export2Excel.Worksheets(1).VPageBreaks(1).DragOff("Direction").Value = -4161 $oExcel_Export2Excel.Worksheets(1).VPageBreaks(1).DragOff("RegionIndex").Value = 1 $oExcel_Export2Excel.Worksheets(1).VPageBreaks(1).DragOff.Direction = -4161 $oExcel_Export2Excel.Worksheets(1).VPageBreaks(1).DragOff.RegionIndex = 1
Any further idea?
I'm using Office 2013 only!
Appending Many Excel Files Together
So I am doing a custom inventory script that creates an excel document with 4 columns and sends a copy of the excel file over to a network location.
What I end up with is a few hundred excel files each representing a single computer. My goal is to append all of those documents together into a single document so that I can turn the data into a table for sorting and review.
I know there are a few ways to skin this cat, just not sure the easiest and best.
I was trying using com objects based on an old thread I found by searching but I fail on my Line 10 when I try to declare the $master sheet I get not an object.
I am open to any solution, and interested in the com method as well since I am learning that stuff on the side.
My Broken Script
#Include <File.au3> #Include <Array.au3> #Include <FileConstants.au3> $aFiles = _FileListToArray("\\vpsfs1\pstinfo\pst info\", "*.xls", $FLTA_FILES, TRUE) ;_ArrayDisplay($aFiles) $oEX = ObjCreate("","excel.Application") $master = $oEX.Workbooks.Open("\\vpsfs1\pstinfo\master.xlsx") For $i = 1 to $aFiles $another = $oEX.Workbooks.Open($aFiles[$i]) $another.Activesheet.UsedRegion.Copy $next = StringSplit($master.ActiveSheet.UsedRange.Address,"$") $master.Activesheet.Range("a" & Activesheet.usedrange.rows.count + 1).Select $master.Activesheet.Paste Next