Bug 6807 - [PATCH] [ 501897 ] Query refresh dialog when open XLS file
Summary: [PATCH] [ 501897 ] Query refresh dialog when open XLS file
Status: RESOLVED FIXED
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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-01 21:23 UTC by Andy Oliver
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments

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: (?)
 (admin)
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,
HSSFCell.CELL_TYPE_STRING);
cell.setCellValue("Text");
cell = row.createCell((short)1,
HSSFCell.CELL_TYPE_NUMERIC);
cell.setCellValue(123);

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

OR Attach A Comment: (?)

Followups:

Message

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

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 
user_id=421542

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 
user_id=287767

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:

------------------PATCH
--- ./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)


-----------------------------PATCH--------------------

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.

Thanks,

Andy

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
test
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.