Docs: SpeedGen: The #across Command (Left-to-Right Data insertion)

What is the #across command?

Using the #across specifier you can insert data from Left to Right, across the row instead of down the spreadsheet. Excel is limited to 256 columns per spreadsheet but you don't have to worry about that since SpeedGen will just insert a new row and wrap around and continue inserting data until there is no data left to insert.

Wrapping Example: (insert 1024 pieces of data from 2 to 1025)

The #across specifier is the command that tells SpeedGen to write the field across the row instead of down. To do this, simply append the #across specifier to the Field Marker that you wish to write from Left to Right with.

RecordSource Field Marker Example

>>2^Region#across means Insert the first piece of data from the "Region" field of the 2nd RecordSource into this cell and continue to insert all remaining data of the 2nd RecordSource for the "Region" field in all cells to the right of this cell, until the end of the recordsource is reached. If the end of the spreadsheet is reached, then wrap around, insert a row and continue on the cell beneath this one until there is no data left.

Array Variable Field Marker Example

>>$Sales#across

Write the data of the 1D Sales Array across the row from Left to Right.

Real-World Example

Source Workbook

Generated Workbook

This was taken from the Across Sheet of the States.xls sample.

 

Guidelines
  • Do not mix and match #across field markers with Multi-Row Field Markers on the same row. You can do this but you won't get more than 1 row of the array / RecordSource field marker's data. Regular Variable field markers are ok on the same row.
  • Only put one #across marker per row.
  • All cells where data is inserted using an #across marker will be overwritten. So if your #across marker is on cell A1 and it is inserting a 3 element array then the contents of cells B1 and C1 will be overwritten. However, if you are inserting 300 pieces of data then when SpeedGen wraps around to the next row it will insert a new row and not overwrite anything on that was on row 2 of the Source Workbook (row 2 will be row 3 in the Generated Workbook).
  • Column ranges do not Stretch the way that row ranges Stretch when data is inserted. So please take this into account when designing your Source Workbook. =sum(A1..A2) will still be =sum(A1..A2) even if you inserted data into cells A1 through A10.
Sample

(c) 2000-2003 Optimized Software Canada Inc. All Rights Reserved.

Microsoft® Excel is a Registered Trademark of Microsoft Corporation.