Jump to content
Sign in to follow this  
souldjer777

ArrayDisplay with 2-Dimensional Array 1 Column and 1 Row

Recommended Posts

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!

Posted Image

Posted Image

Edited 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 say
Artist: Middle Class Rut

Share this post


Link to post
Share on other sites

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 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-30 - Version 1.6.2.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

_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 :graduated:

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 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 say
Artist: Middle Class Rut

Share this post


Link to post
Share on other sites

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 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-30 - Version 1.6.2.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

Thanks for the info water - I get the same issue though...

Posted Image

_ArrayDisplay($atabledata)
Edited 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 say
Artist: Middle Class Rut

Share this post


Link to post
Share on other sites

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 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-30 - Version 1.6.2.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

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)

Posted Image

Edited 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 say
Artist: Middle Class Rut

Share this post


Link to post
Share on other sites

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 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-30 - Version 1.6.2.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...