Jump to content
Sign in to follow this  
souldjer777

ArrayDisplay with 2-Dimensional Array 1 Column and 1 Row

Recommended Posts

souldjer777

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
water

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 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
souldjer777

_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
water

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 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
souldjer777

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
water

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 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
souldjer777

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
water

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 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - 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  

×