Bug 6807 - [PATCH] [ 501897 ] Query refresh dialog when open XLS file
Summary: [PATCH] [ 501897 ] Query refresh dialog when open XLS file
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 1.0.2
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2002-03-01 21:23 UTC by Andy Oliver
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Andy Oliver 2002-03-01 21:23:21 UTC
[ 501897 ] Query refresh dialog when open XLS file
Submitted By:
Steven R Smith (steversmith) Date Submitted:
2002-01-10 11:13
Date Closed:
2002-01-12 11:21
Data Type: (?)
Category: (?)
 (admin) Group: (?)
Assigned To: (?)
 (admin) Priority: (?)
Status: (?)
Resolution: (?)
Summary: (?)
I used the HSSF API to create a very simple XLS file.
When I open the resulting file in Excel, I get a
dialog box titled "Query Refresh" that indicates the
workbook contains queries to external data that
refresh automatically, followed by a warning about
using automatic refresh, and then a couple of buttons
to either enable or disable automatic refresh.

Any ideas on how to prevent this dialog box from
showing up?

I am using Excel 2000 on a WinNT 4.0 workstation
(do I need to use another version of Excel?).

Heres the code I used to create the file:
// create a new workbook with one sheet
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet s = wb.createSheet("Demo Sheet");

// create a row
HSSFRow row = s.createRow((short)0);

// create a numeric and a text cell
HSSFCell cell = row.createCell((short)0,
cell = row.createCell((short)1,

// finally, write the workbook out to a file
FileOutputStream out = new FileOutputStream(FILENAME);
Use Canned Response: (?)

OR Attach A Comment: (?)



Date: 2002-01-12 11:21
Sender: acoliver2
Logged In: YES 

one day sourceforge will actually close this bug. 
Personally I think its possesed.  Don't htink I'll be doing
a project in PHP anytime soon if this is the kind of
performance we can expect.  

Date: 2002-01-10 13:49
Sender: steversmith
Logged In: YES 

Thanks for the very quick response!  

I am using the production version of HSSF (poi-
1_0_1.tar.gz).  I was able to apply the suggested mod to 
the source code and everything seems fine now.

Date: 2002-01-10 12:44
Sender: acoliver2
Logged In: YES 

Are you using the development or the production version of HSSF?

You can solve this problem in the production sources by
applying this patch net.sourceforge.poi.hssf.model.Workbook:

--- ./Workbook.java	Mon Dec 24 10:31:01 2001
+++ /home/andy/Workbook.java	Wed Jan  2 14:06:14 2002
@@ -958,9 +958,9 @@
         RefreshAllRecord retval = new RefreshAllRecord();
-        retval.setRefreshAll(true);   // by default refresh
the calculations on
-        return retval;   // startup  -- differs from sample
but seems
-    }                    // like it may help us.
+        retval.setRefreshAll(false);   // by default
refresh the calculations off 
+        return retval;   
+    }                    
      * creates the BookBool record with saveLinkValues set
to 0. (don't save link values)


if you are unable to use patches you can edit the line to
read: retval.setRefreshAll(false);

(and delete the incorrect comments).

This SHOULD be fixed in the next development build.  Someone
who has Office 2k should test this patch.  (I have Excel 97)

I never heard back from the last person who had this problem
on whether it was resolved.



Check to Upload & Attach File: (?)

File Description:

Existing Files:
Delete Name Description Download
No Files Currently Attached
Change Log:
Field Old Value Date By
status_id Open 2002-01-12 11:21 acoliver2
close_date 1969-12-31 19:00 2002-01-12 11:21 acoliver2
resolution_id None 2002-01-10 16:02 acoliver2
Comment 1 Andy Oliver 2002-03-04 02:46:59 UTC
Comment 2 Andy Oliver 2002-03-04 02:49:31 UTC
test again
Comment 3 Andy Oliver 2002-03-04 02:56:53 UTC
test again..
Comment 4 Andy Oliver 2002-03-04 12:52:34 UTC
.. another blasted test.
Comment 5 Glen Stampoultzis 2002-03-11 02:11:01 UTC
This has been fixed and will be available for the 1.5 release.