souldjer777 Posted October 15, 2012 Posted October 15, 2012 (edited) Good Morning All,I am getting the ugliest results from a _IETableGetCollection _IETableWriteToArray and finally _ArrayDisplay. All the returned data is squished together in a single cell due to the 1 Column and 1 Row result. How can I separate the values of the Array to make things look better and fit in the proper columns? Trying to add pictures to this post so wish me luck Thanks everyone! Edited October 15, 2012 by souldjer777 "Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"Song Title: I guess you could sayArtist: Middle Class Rut
water Posted October 15, 2012 Posted October 15, 2012 To split the content of a string into pieces a chracter in the string has to be the "separator character". What's your separator character? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
souldjer777 Posted October 15, 2012 Author Posted October 15, 2012 (edited) _ArrayDisplay($atabledata,"TEST", -1, 0, "", "|", "|Holiday|TZ|Start|Name|Function|Comments|OUTOFFICE|BlackBerry|DeskPhone|Ministry|SiteName|FacilityGroup|SiteAddress|Edit|Date") I'm just an idiot when it comes to arrays... need I also used this to add carriage returns but I have no idea how to separate the data into diff columns and rows for ArrayDisplay ;Display $atabledata's contents Local $output = "" For $r = 0 To UBound($atabledata, 1) - 1 $output = $output & @CR For $c = 0 To UBound($atabledata, 2) - 1 $output = $output & $atabledata[$r][$c] & " " Next Next MsgBox(4096, "Array Contents", $output) Edited October 15, 2012 by souldjer777 "Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"Song Title: I guess you could sayArtist: Middle Class Rut
water Posted October 15, 2012 Posted October 15, 2012 There is a bug in ArrayDisplay when you set the separator character. Best in this case is to only use "_ArrayDisplay($atabledata). My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
souldjer777 Posted October 15, 2012 Author Posted October 15, 2012 (edited) Thanks for the info water - I get the same issue though..._ArrayDisplay($atabledata) Edited October 15, 2012 by souldjer777 "Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"Song Title: I guess you could sayArtist: Middle Class Rut
water Posted October 15, 2012 Posted October 15, 2012 But why do you get everything in a 1x1 array? Shouldn't _IETableWriteToArray return the correct array? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
souldjer777 Posted October 15, 2012 Author Posted October 15, 2012 (edited) My apologies to water - I didn't mean to waste anyone's time... I really thought it was a formatting issue.I kept plugging in different table indexes... and finally got one that formatted the data correctly - please excuse me water.Hey if anyone has my same issue just keep trying different tables indexes_IETableGetCollection($oIE, 49) ; 1, 2, 3,... 47, 48, 49...I stopped trying different indexes because I was getting data just wrong format... and I had 50 tables to try...Brute forced it though and finally got data I could actually read in the correct number of columns and rows.Is there an easier way to do this other then just guessing the $i_index number???$oTable=_IETableGetCollection($oIE, 49) ; Change your table number here and keep trying!!! Don't give up! $atabledata=_IETableWriteToArray($oTable, True) _IEQuit($oIE) _ArrayDisplay($atabledata) Edited October 15, 2012 by souldjer777 "Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"Song Title: I guess you could sayArtist: Middle Class Rut
water Posted October 15, 2012 Posted October 15, 2012 To get data from a sharepoint server there might be a better way. IIRC there is a Sharepoint UDF available on the forum (like one).We have no sharepoint server here so I can't help with that subject. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now