Tag Archives: OfficeWriter

Error installing OfficeWriter for Reporting Services 2012 in SharePoint integrated mode

Problem

When installing OfficeWriter for SQL Server Reporting Services 2012 in SharePoint mode (SharePoint 2010), the OfficeWriter installer aborts with message:

SoftArtisans OfficeWriter Setup Wizard ended prematurely because of an error. Your system has not been modified. To install this program at a later time, run Setup Wizard again. Click the Finish button to exit the Setup Wizard.

Solution

Starting in SQL Server 2012, the SharePoint integration for Reporting Services was re-architectured: SSRS 2012 is configured as a shared service against SharePoint 2010. Configuration information is stored in a database and can be managed through SharePoint Central Administration or with Powershell.

Due to this change in architecture, the OfficeWriter installer is not currently equipped to run against SSRS 2012 in SharePoint integration mode. We will be adding support for this configuration to the OfficeWriter installer in a future release.

Update 4/11/2013: Instructions for manually installing OfficeWriter in this configuration are now available in our documentation: Manual Installation for SSRS 2012 with SharePoint 2010. The fix to the installer will be available in a soon to be released version of OfficeWriter.

Note:

This does not happen outside of SSRS 2012 with SharePoint 2010. OfficeWriter has full compatibility with SQL Server Reporting Services 2012 in native mode starting in v8.2. OfficeWriter also works with other combinations of SSRS and SharePoint.

Designer Error: Could not load an object because it is not available on this machine

Problem

After installing the OfficeWriter Designer for Office 2007 or 2010, Excel or Word throws the following error three times when opened:

Could not load an object because it is not available on this machine.

Following the instructions in Designer throws compile error after installing Microsoft August 2012 updates to re-register MSCOMCTL.OCX do not resolve the issue.

Solution

In August 2012, Microsoft released Security Bulletin MS12-060 which targeted a security vulnerability in the Microsoft Common Controls SP6 (MSCOMCTL.OCX). As part of the security update, a new version of the library was distributed to all Office 2010 SP1, Office 2007 SP2 and Office 2007 SP3 installations.

The OfficeWriter Designer requires the new version of MSCOMCTL.OCX. If the older version is present, the above error will occur.

To resolve this issue:

This will require admin privileges and we recommend that you consult your IT staff before applying these updates.

1. Install the appropriate service pack to Office 2007 or 2010:

If the latest service pack is not applied, the new version of MSCOMCTL.OCX will not be installed on the machine, even if the security update is run.

To verify that the installation completed successfully, follow the instructions in this How to tell which Office service pack is installed blog post.

2. Download and install the version of the update for your version of Office:

3. If you experience a compilation error when you open Office, try following the instructions in Designer throws compile error after installing Microsoft August 2012 updates to re-register MSCOMCTL.OCX.

Additional Help – Installing Service Packs

Before you can install the service pack, you may need to clear some disk space. Microsoft has an article on Strategies for freeing disk space, which suggests that you Delete files using the Disk Cleanup tool. If you are working on a server OS, such as Windows Server 2008, the Disk Cleanup tool may not be installed. Instructions for how to install the Disk Cleanup tool are outlined in this MSDN forum post.

Designer Compile Error: Cannot run the macro ‘OnLoad’

Problem

After installing Microsoft’s August 2012 security updates on a machine with the OfficeWriter Designer installed, you may encounter the following:

Office 2003, 2007, or 2010 throws an error when opening: Compile error: Automation error Unspecified Error followed by Cannot run the macro ‘OnLoad.’ The macro may not be available in this workbook or all macros may be disabled.

Details

One of the Microsoft August 2012 security updates targeted a vulnerability in Windows Common Controls: MS12-060 – Vulnerability in Windows Common Controls.

On the detail page (2720573), it mentions that there is a known issue with all versions of Office when installing this update:

“Windows Common Control-based embedded Active-X controls may fail to load within pre-existing office documents, within third-party applications, and when you insert new controls in developer mode.”

This affects the OfficeWriter Designer as well.

Update

Alternate error message:

Compile error: Automation error Unspecified error

This may also affect customers who switch between Word 2007 and Word 2010. When you switch back to Word 2007, this error may be re-introduced and you will need to follow the solution steps again.

Solution

To resolve this issue, MSCOMCTL.OCX must be re-registered on the machine:

1. Run the command prompt as Administrator

2. Register MSCOMCTL.OCX:

  • For 64-bit operating systems, type the following: Regsvr32 “C:\Windows\SysWOW64\MSCOMCTL.OCX”
  • For 32-bit operating systems, type the following: Regsvr32 “C:\Windows\System32\MSCOMCTL.OCX”

3. A computer restart may be necessary

For more information about resolving this issue, please refer to the following Microsoft KB articles for Office 2010Office 2007, or Office 2003.

PivotTables are not displaying correctly

Problem

After creating or modifying a PivotTable with ExcelWriter 8.4 or later, the PivotTable has not changed or is empty.

Solution

ExcelWriter does not have the ability to render PivotTables. Changes made to a PivotTable using ExcelApplication will not take effect until the PivotTable is refreshed. There are several ways to refresh the PivotTable:

  1. If you are editing an existing PivotTable, in the original file, go to PivotTable Options > Data > Check off “Refresh data when opening the file.” This will ensure that Excel refreshes the PivotTable as soon as the output is opened.
  2. If you are creating a new PivotTable from scratch, make sure to set the PivotTable.PivotTableSettings.RefreshOnOpen to true. This will force the PivotTable to refresh automatically when the output is opened.
  3. If you don’t want to have Excel refresh the PivotTable when the workbook opens, you can refresh the PivotTable manually or with a macro. Right-click the PivotTable and select Refresh.

We encourage users to keep “Refresh on Open” enabled when working with PivotTables in ExcelWriter to make sure that modified PivotTables load correctly in Excel.

ExcelWriter Error: Resulting sheet would have more rows than are permitted by the Excel format

Problem

The Excel .xls binary format has a limit of 65536 rows per worksheet. If you are importing data with ExcelWriter’s ExcelTemplate object (or our SSRS renderer, which uses the ExcelTemplate object) it is possible to get an error that Excel’s row limit was exceeded even though you know you have imported much fewer than 65K rows.

This problem is usually caused by cells or formulas that already exist in the template file. When ExcelWriter populates a spreadsheet with the ExcelTemplate object, it inserts a new row for every row of data and pushes all existing rows down. If the total number of pushed down rows plus inserted rows exceeds Excel’s limit, an exception will be thrown. Then, after the data has been imported, ExcelWriter goes through the entire workbook and updates any formulas that reference the data marker cells, stretching the formulas to include all the newly inserted rows. If the cell range in a formula is stretched beyond Excel’s row limit, again an exception will be thrown.

Solution

Cells

Sometimes people take a previously populated report and turn it into a template. They may have cleared the cell values, but the template may still contain many rows of cells that are blank or contain only formatting. These rows will be pushed down when the data is imported.

The solution is to clean up the template file by actually deleting all unnecessary rows and columns rather than just clearing cell values. Also, it’s generally a good idea to set background formatting using row or column headers rather than by selecting large areas of cells.

Formulas

Formulas can be found in many parts of a workbook, including cells, charts, conditional formatting, and named ranges. Make sure that all formulas reference the minimum number of rows necessary and bear in mind that ExcelWriter will stretch certain formulas when new rows are inserted.

Hidden named ranges

It is important to know that Excel sometimes creates hidden named ranges behind the scenes for internal purposes. You won’t be able to find them through the Excel UI, but if they reference data marker cells, ExcelWriter will update them. Common cases where Excel created hidden named ranges are when the user applies an AutoFilter or AdvancedFilter to a range of cells. This occurs whether the filter is applied from the Excel UI or from a VBA macro. For this reason, check your macros carefully to make sure they are not applying any filters to unecessarily large cell ranges that include data markers. If you have any unnecessarily large hidden named ranges in your macros, you can modify them by changing the VBA code and running the macro again. If you are having trouble modifying or removing hidden named ranges, you can write some VBA code to do it. The names always end in “`_FilterDatabase”

Tip: If you have Excel 2007 or above, here is a quick way to see if you have any hidden named ranges in an .xls file without writing any VBA:

  1. In Excel, save a copy of the template file as .xlsx or .xlsm
  2. Rename to .zip and unzip the file
  3. In the subdirectory “xl”, open the file workbook..xml
  4. Look in the Section
  5. Look for defined names that end in “_FilterDatabase”. Here is an example of something you might see: <definedName name="xlnm.FilterDatabase” localSheetId=”3″ hidden=”1″> Data!$A$1:$BQ$65000
  6. If you temporarily change hidden to 0, it will show up in Excel under the named item manager.

Note: We don’t recommend permanently modifying or removing these hidden named ranges in the XML directly as that could have unexpected results.

Word Error: Could not start converter mswrd632.wpc

Problem

When you try to save a Word 2007 template as part of a SQL Server Reporting Services RDL you get an error:

Word cannot start the converter mswrd632.wpc

Solution

This error is caused by a Windows security update published December 2009, affecting Windows XP, Windows 2000 and Windows Server 2003. You can resolve the issue by disabling the converter through the registry. Open regedit and delete the registry keys at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Text Converters\Import\MSWord6.wpc. Restart Word and the error should disappear.

You can find more information in this article. It also provies a script that will perform the registry fix for you. The additional steps mentioned in the update to that article have not been tested, as unregistering the converter has solved the problem in every instance in which we’ve encountered it.

Note that this issue only affects Word 2007 SSRS templates. Word 2003 templates are not affected. Also, Excel 2007 is not affected by this issue.

Reporting Services Error: The following bookmark cannnot be found in the template

Problem

When rendering an OfficeWriter for Word Reporting Services report, after removing all bookmarks from the template for a specific data source, the following error occurs:

Reporting Services Error ---------------------------------------------------------- An error occurred during rendering of the report. (rrRenderingError) Get Online Help An error occurred during rendering of the report. WordWriter Error: The following bookmark can't be found in the template: DataSourceName The following bookmark can't be found in the template: DataSourceName -------------------------------------------------------------------------------- SQL Server Reporting Services 

For example, someone may decide to remove a table of data from their report which they no longer want to display. To do this, they would delete the table, thereby removing the merge fields in it and the bookmark around the table row that defined the Selection Query Range for that data source.

Solution

As mentioned above, this error occurs when a Selection Query Range is defined for a data source and then removed from the template. Once a Selection Query Range for a data source is added to the template using the OfficeWriter Designer toolbar, a bookmark is added to the template to define what portion of the document should repeat and that data source is linked to the template in the report’s RDL file. If all the bookmarks for this data source are then removed from the template, the references to that data source in the RDL file that the Designer added are not automatically removed.

This behavior is planned to change in a future version, so that it will be possible to define a Selection Query Range for a data source in a template, and then later decide to remove it. In the meantime, there are two workarounds to this issue:

Remove the relevant block from the RDL for the data source that is no longer used

Important: Back up your RDL file before making manual changes to it in case you make a mistake.

For each data source used in the template, the OfficeWriter Designer adds a DataSourceName">... block in the RDL file.

If a data source is no longer used in the template, simply open the RDL file in a text editor and remove the correspoding Table block.

For example, if you want to remove this block for a data source called Contacts, look for the ... block and delete it.

Design your report from scratch

Build a new report from scratch (both RDL and Word template). When designing the template, be careful to only add Selection Query Ranges for data sources that will definitely be used in the report. (Don’t plan on removing all the bookmarks for any data source.)

Designer Error: Type Mismatch

Problem

Selecting Open Report in the OfficeWriter Designer toolbar in Excel displays a type mismatch error.

The type mismatch error occurs when a client machine is configured with regional settings that cause Excel to return it’s version number in a format the designer does not expect. For example, French regional settings by default use the space (” “) digit grouping symbol.

Solution

Option 1: Upgrade (recommended)

This issue has been fixed in the OfficeWriter Designer version 4.6.1 and later without the need to adjust regional settings.

Option 2: Adjust the current regional settings for the OS

Navigate to the systems control panel > regional settings. Depending on your operating system this may appear as:

  • Region and Language
  • Date, Time, Language, and Regional Options
  • Select either Customize or Advanced settings

Change the Digit grouping symbol to “.” excluding quotes, or other symbol that does not cause an error. Then apply changes.

OfficeWriter Designer toolbar is not visible in Excel or Word

Problem

After installing the OfficeWriter Designer, the Designer Add-In is not available in Excel/Word. This may occur if:

  • The OfficeWriter Designer installer was not run
  • The Designer was not installed properly
  • The Designer is currently disabled.

Solution

To run the OfficeWriter Designer installer

The OfficeWriter Designer is a component that is redistributible and does not require a license key. There is a separate installer for the OfficeWriter Designer.

The Designer installer is available for separate download from http://www.officewriter.com/product-updates or upon request.

To check if the OfficeWriter Designer was installed correctly:

Make sure that hidden folders are visible:

  • Open a folder and go to Folder options
  • Under ‘Files and Folders’ locate ‘Hidden Files and Folders’
  • Select ‘Show hidden files and holders’

Check the ApplicationData\Microsoft start directories for the Add-In files:

  • For Excel: look for SAExcelTemplateAddIn.xlam in Application Data\Microsoft\Excel\XLSTART
  • For Word: look for SAWordTemplateAddIn.dotm in Application Data\Microsoft\Word\STARTUP

If the files are there, the OfficeWriter Designer was installed correctly, but might be disabled. See below for how to re-enable the Designer if it’s been disabled.

If the files are not there, then the OfficeWriter Designer was not installed properly. Try uninstalling the OfficeWriter Designer through Add/Remove programs and try to re-install.

How to re-enable the Designer if it has been disabled:

Office 2007/2010:

  • Go to the Office menu button (2007) or File tab (2010) in the upper left hand corner.
  • Click Excel/Word Options
  • Select Add-Ins from the left menu
  • At the bottom, select ‘Disabled Items’ from the ‘Manage’ drop-down menu.
  • Click Go
  • If the OfficeWriter Designer is there, select and click Enable.

Office 2003:

  • Go to the Help menu and select About Microsoft Office Excel/Word
  • Click Disabled items*
  • If the OfficeWriter Designer is listed, select and click Enable.

Error: Could not load file or assembly ‘vsjlib, Version=1.0.3300.0’

Problem

After migrating to the .NET 4.0 Framework, an OfficeWriter application throws the error:

Could not load file or assembly ‘vjslib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Solution

OfficeWriter 3.x relies on the J# runtime, so users who have tried using OfficeWriter 3.x with Visual Studio 2010 and the .NET 4.0 Framework have run into issues. This is due to the fact that Microsoft does not have a version of the J# runtime for .NET 4.0.

There are two possible solutions:

#1: Update to OfficeWriter 4.x or later (recommended)

The J# runtime dependency was removed in OfficeWriter 4.0.0, so upgrading to OfficeWriter 4.x or later resolves the issue. We recommend upgrading because all new features and bug fixes are released in the latest version of OfficeWriter.

#2: Downgrade to an earlier version of .NET

For .NET versions 2.0 or 3.0, Microsoft has a J# redistributable package available for 32-bit and 64-bit systems. Microsoft also has a redistributable package of J# for .NET Version 1.1.

NOTE: OfficeWriter 3.x is no longer supported. OfficeWriter Supported Versions Policy