Unwired Accelerator lets you create applications that are based on files. The file must contain data arranged in a format that can be mapped to grid data (see “Using grid rules” for information about grid rules, for example:
Delimited columns – a file that has data separated by commas, tabs, semi-colons, colons, or spaces, such as a file with a .csv extension, or an Excel spreadsheet.
Fixed-size columns – a file with data arranged in columns of a fixed size with a .txt extension.
Using either file type, you can create an application element that uses the grid-rule functionality of Unwired Accelerator.
UA uses the uploaded copy of the file, not the copy
that is local to the browser. In other words, changes to the original
file have no impact on the application created from the uploaded
file. To have the changes take effect, you must upload the application
again.
For Excel spreadsheets, you can capture data from the Excel file, choose the Excel sheet from the available list of sheets, and define grid rules on the captured data. Keep in mind the following:
You can use Excel 95, 97, 2000, XP, and 2003 worksheets.
All static data displayed in cells is captured, including positive and negative numbers. For negative numbers, if the format specifies parentheses, the negative number is captured within parentheses.
UA supports these cell formats: General, Date, Time, Currency, Percentage, Accounting, Fraction, and Text.
UA captures all data in the spreadsheet, regardless of whether filter rules are defined in the Excel file.
Data in merged cells is captured, but will not be displayed as merged cells; for example, if cells in column 1, 2, and 3 are merged, data displays in column 1. If cells in column 2 and 3 are merged, data displays in column 2.
Non-ASCII data in Excel files, such as cells, sheet names, and file names, is supported.
Excel capture functionality is supported for BlackBerry and PDA online and offline clients, and for Smartphone offline clients.
The following capabilities are not supported:
Password-protected Excel files
Update, delete, and insert operations
Cannot capture charts, formulas, and comments
UA does not support these cell formats: Special and Custom (although the value, without formatting, is captured)
You cannot remove the uploaded Excel file from Mobile Web Studio. You can navigate to the file and delete it manually.
The excelfilelimit property in the global.properties.xml file
specifies the maximum file size allowed in KBs. If you have problems
capturing an Excel spreadsheet, you may need to increase the file
size from the default of 200 MBs to a larger size.
Creating a file element using an Excel spreadsheet
You can create file elements using an Excel spreadsheet.
Log in to Web Studio, select Build Applications, select New from the Application Manager Status menu, then click New to launch Application Builder.
Click the arrow to the right of the Add button and select File Element. You see the New File Element window, which allows you to identify the file to upload from your local machine to the Unwired Accelerator server.
Complete the File Element Definition options:
File to Upload – enter the file name of your source data, or browse the file structure to select the file.
Destination Location – click Upload to accept the default location, which is created automatically in SYBASE\PortletDocs\masuper.
Click OK to confirm.
File Name – leave blank. This field is automatically filled in once you upload the file.
Choose Worksheet – this option displays if you uploaded a worksheet. Select a sheet from the drop-down list.
Click Preview to see the result. Click Next.
In the Define window, define the record layout and specify a record header. See “Defining record layout”. Click Next.
In the Filter window, specify filter rules to select only the relevant data from the element. See “Adding filter rules”. Click Next.
In the Preview window, enter a name for the file element, and click Finish.
In the Application Builder, click Save. See “Saving applications”.
Creating a file element from a delimited file
You can create file elements using files that use commas, tabs, semi-colons, colons, or spaces to separate data.
Log in to Web Studio, select Build Applications, select New from the Application Manager Status menu, then click New to launch Application Builder.
Click the arrow to the right of the Add button and select File Element. You see the New File Element window, which allows you to identify the file to upload from your local machine to the Unwired Accelerator server.
Complete the File Element Definition options:
File to Upload – enter the file name of your source data. You can browse to select the file
Destination Location – click Upload to accept the default location, which is created automatically in SYBASE\PortletDocs\masuper.
Click OK to confirm.
File Name – leave blank. This field is automatically filled in once you upload the file.
Delimiter – this option displays if you uploaded a delimited file. Select the delimiter used in the source data file from the drop-down list. Options include tab, semi-colon, colon, comma, and space.
Merge Repeated Delimiters – this option displays if you uploaded a delimited file. Specifies whether repeated delimiters should be replaced with a single delimiter. This is useful if your source data includes blank columns. Select the checkbox to indicate “true” or leave it blank to indicate “false”.
Text Quoter – this option displays if you uploaded a delimited file. Specifies the quote character used to define a section of “as is” text that may include delimiters.
Click Preview to see the result.
Click Next.
In the Define window, define the record layout and specify a record header. See “Defining record layout”. Click Next.
In the Filter window, specify filter rules to select only the relevant data from the element. See “Adding filter rules”. Click Next.
In the Preview window, enter a name for the file element, and click Finish.
In the Application Builder, click Save. See “Saving applications”.