Convert an Excel workbook to an InfoPath form template

Author: mety Labels::



When you convert an Excel workbook to an InfoPath form template, the workbook is used like a blueprint to create a new form template. The table structure of the workbook is recreated as a layout table (layout table: A collection of cells used to arrange form content such as text or controls.) in the form template. If you choose to include cells that are used to collect data when you convert the workbook, text box controls are added to the form template in the layout table cells that correspond to the location of the fields in the workbook. The size and position of supported cells, cell borders and shading, and whether cells are merged or split are preserved in the resulting form template.
If your workbook contains several worksheets, the data and formatting on the first worksheet are added to the default view (view: A form-specific display setting that can be saved with a form template and applied to form data when the form is being filled out. Users can switch between views to choose the amount of data shown in the form.) in the new form template, and the additional worksheets are converted to corresponding views in the form template. The titles of each additional view match the titles of the worksheets.
To better understand the relationship between a workbook that you convert by using the InfoPath Import Wizard and the resulting form template, imagine that you are an insurance agent with a workbook named Claims.xls that contains two worksheets. The first worksheet is named Home and the second is named Automobile. Among the columns on each worksheet are ones with the column headers Type, Description, Loan Amount, and Purchase Price. The Loan Amount and Purchase Price columns on each worksheet are formatted to use a currency data type. All column headers are formatted as bold blue text. The Home worksheet contains a formula to calculate an amortization schedule. A single cell, with border formatting applied on all sides, is used to enter a customer's name.
If you use the the Import Wizard to convert Claims.xls to a form template, you create a form template called Claims.xsn.


An Excel workbook before and after it is converted to an InfoPath form template.
When an Excel workbook is converted to an InfoPath form template, the layout and other elements are preserved.


This new form template contains two views. The default view, called Home (default), contains the layout and formatting from the Home worksheet. The second view, called Automobile, contains the layout and formatting from the Automobile worksheet. Each view contains a table with the column headers Type, Description, Loan Amount, and Purchase Price, formatted with bold blue text, just as in the original workbook. However, depending on the settings that you choose in the Import Wizard, some features may differ in the resulting form template:
  • If you use the Import Wizard to convert Claims.xls to a form template by preserving the layout only The resulting form template contains a layout table that corresponds to the table in the Excel workbook. The form template does not contain any text box controls.
  • If you use the Import Wizard to import Claims.xls both by preserving the layout and by converting cells to controls The resulting form template contains a repeating table. Cells that meet certain conditions, such as the cell with border formatting applied on all sides, and the cells that contain or reference a formula for calculating an amortization schedule, are converted to text box controls.
    Note Although cells that contain or reference formulas are converted to text box controls, the formulas are not preserved in the resulting form template. You must recreate the functionality that the formula provided by using the appropriate features in InfoPath.

Features and settings that are not fully supported during conversion

Some settings and formatting in Excel workbooks are not supported by InfoPath. When you convert a workbook that contains such settings, the resulting InfoPath form template will not contain those features or settings. For example, if your workbook has a header that contains an image, the image will not be preserved in the resulting InfoPath form template because InfoPath does not support images in headers and footers.
The following is a list of features and settings that are not preserved when you convert an Excel workbook to an InfoPath form template:
  • Cells with "shrink to fit" formatting
  • Cell background images
  • Cell background patterns
  • Cell gradients
  • Conditional formatting
  • Data validation
  • Formulas
  • Macros
  • Print settings (including A4 paper resizing, black and white, center on page, first page number, page order, pictures, print gridlines, print quality, row and column headings, rows and columns on every page, scaling, and set print area)
  • Vertical text alignment
  • Rows that are narrower than the default font height of 10pt
  • WordArt
The following list explains the features and settings that are partially supported when you convert an Excel workbook to an InfoPath form template:
Cells with data formatting Styles or colors applied to cells with data formatting are not converted. For example, if a cell is formatted to display negative numbers as red text, the number value is converted, but the red text formatting is not.
Hyperlinks that reference unsupported protocols All hyperlinks are converted, but if the hyperlink uses a protocol other than http:, https:, ftp:, or mailto:, the hyperlink will not work when a user clicks the link.
Header and footer alignment and formatting A header or footer in an Excel workbook can contain a left, middle, and right section. These are concatenated upon import to InfoPath. For example, a workbook with a left header containing the name "Wendy Wheeler," a middle header containing the title "Status Report" and a right header containing date "October 13, 2007" would be converted to an InfoPath form template containing a single header with the following text: "Wendy WheelerStatus ReportOctober 13, 2007." If only one section in the workbook's header or footer contains text, the resulting text in the form template will be aligned accordingly. For example, if only the right section of the header contains text in the workbook, then the corresponding text in the form template will be right aligned. Otherwise, all header or footer text is aligned left when it is imported. The font setting applied to the first header or footer section in the workbook is applied to the entire header or footer in the resulting InfoPath form template.
Font conversion Although InfoPath imports the fonts from a workbook when creating a new form template, if the fonts in the workbook are not available on the computer where you perform the import, alternate fonts will automatically be selected for the form template.
Implicitly merged cells In Excel, if you type more text than will fit in the current cell, the text will appear on top of the subsequent cells as if the cells had been merged. InfoPath does not support this feature. If a converted cell contains more text than the cell width can accommodate, the text will wrap to the next line in InfoPath. To prevent this, before you import your workbook, select the cell and as many subsequent cells as are necessary to contain the text, and merge the cells so that the text fits within the merged cell.
PivotTable reports PivotTable reports are converted as layout tables.
Very large tables InfoPath supports tables that are up to 63 columns wide and 999 rows long. If an Excel workbook exceeds these limits, only the first 63 columns and 999 rows will be converted.
Note Some Excel workbooks cannot be opened without a password. If this is the case with your workbook, you may not be able to successfully import it into InfoPath. To fix the problem, try removing the password requirement for the workbook before you import it. In addition, some workbooks are designed to prevent users from moving, deleting, hiding, or changing the name of worksheets, and from changing other structural elements in the workbook. If this is the case with your worksheet, you may not be able to successfully import it into InfoPath. To fix this problem, try removing the structural editing restrictions for your workbook before you import it.

Convert an Excel workbook to an InfoPath form template

  1. On the File menu, click Import Form.
  2. In the Import Wizard dialog box, click InfoPath importer for Excel workbooks, and then click Next.
  3. Click Browse.
  4. Locate and click the Excel workbook that you want to convert, and then click Open.
  5. To change the default import behavior, click Options, and then select the options that you want.
  6. Click Finish.
    Note Depending on the layout and complexity of your Excel workbook, some layout elements or controls might not appear as you expected in the resulting InfoPath form template. As a result, you may need to make adjustments to your new form template after you convert it.

0 comments |

Labels

Blog Archive

Powered by Blogger.

I made these pages for me and my friends to help solving the problem we face regarding Computer & internet, if anyone wants me to answer a question or find out about some information please send me email and I will try to reply.*P.S. some of the article I wrote and the other I found on the internet I posted them in sprit of learning and shearing, please forgive me if you found something you don’t want to be in my blog, email me and I will delete them. Thank you for your interest in my pages.امل نجم Amal Nagm

banner 1 banner 2