Guys
I am working with an excel workbook and have 99% complete however there is
one line that is keeping me from fully automating this proecess.
Code:
Excel.Application excelApp = new Excel.ApplicationClass();
Excel.Workbook excelWorkbook = excelApp.Workbooks._Open(excelFile, false,
false, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
object sheetFormat = Microsoft.Office.Interop.Excel.XlFileFormat.xlHtml ;
String outputFile = @"C:\Program\EnergyReport\EnergySheets.html";
// here is the line
excelWorkbook.SaveAs(outputFile, sheetFormat, Type.Missing, Type.Missing,
false, false, Excel.XlSaveAsAccessMode.xlNoChange,
Excel.XlSaveConflictResolution.xlLocalSessionChang es, false, Type.Missing,
Type.Missing, Type.Missing);
Where I do the "SaveAs" workbook I get a dialog pop-up window that informes
me that I will "lose my customer view, do I wish to continue" I always say
yes and from there on everything is fine.
How can I stop, or via code remove the user interaction with this dialog box?
Thanks 1 2115
Set
excelApp.DisplayAlerts = false;
before doing the saveAs.
Robin S.
-------------------------------------
"BrianDH" <Br*****@discussions.microsoft.comwrote in message
news:3A**********************************@microsof t.com...
Guys
I am working with an excel workbook and have 99% complete however there
is
one line that is keeping me from fully automating this proecess.
Code:
Excel.Application excelApp = new Excel.ApplicationClass();
Excel.Workbook excelWorkbook = excelApp.Workbooks._Open(excelFile, false,
false, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
object sheetFormat = Microsoft.Office.Interop.Excel.XlFileFormat.xlHtml ;
String outputFile = @"C:\Program\EnergyReport\EnergySheets.html";
// here is the line
excelWorkbook.SaveAs(outputFile, sheetFormat, Type.Missing, Type.Missing,
false, false, Excel.XlSaveAsAccessMode.xlNoChange,
Excel.XlSaveConflictResolution.xlLocalSessionChang es, false,
Type.Missing,
Type.Missing, Type.Missing);
Where I do the "SaveAs" workbook I get a dialog pop-up window that
informes
me that I will "lose my customer view, do I wish to continue" I always
say
yes and from there on everything is fine.
How can I stop, or via code remove the user interaction with this dialog
box?
Thanks
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Carl |
last post by:
Please can anyone tell me how I can create a macro to save the results
of a query as an excel file? The query is called Student List and I
would like to save it to "My Documents".
We have had...
|
by: robert d via AccessMonster.com |
last post by:
I just imported 62000 rows twice from Excel. In my import routine, I create a
holding table and then validate the data prior to committing to the main
table. The holding table is created in the...
|
by: alwayssmiling |
last post by:
Hi frends,
In my application, a class supports backend processing. In this class im creating a new excel sheet and im inserting some data into this excel sheet, and im trying to save the file...
|
by: Tammy Viola |
last post by:
I would like to import an Excel Worksheet as a new table in the backend
of an Access database.
Looked at using docmd.TransferSpreadsheet without success. Also looked
at creating a table using...
|
by: Craash |
last post by:
I understand this is an access forum so I apologize if this is inappropriate.
I have an excel spreadsheet that I have created a query using a DSN to access a sql database. My question; is there a...
|
by: james.igoe |
last post by:
I've been hired to produce a reporting database that takes data from
numerous sources (5 financial products, from three regions, each with
multiple tabs) and although I'm confident I can build...
|
by: farhaaad |
last post by:
Hi everybody,
I just wanted to know if i can make a form in excel (the same as
access forms), so when i enter data in excel form it goes to a table
in access ? I mean when i enter a value in a...
|
by: pleaseexplaintome_2 |
last post by:
using the code below (some parts not included), I create a new excel
workbook with spreadheets.
I then want to delete a spreadsheet, but a reference remains open and
excel stays in task manager...
|
by: PW |
last post by:
Convert them to CSV in Excel, then use TransferText (which does not
work correctly and also doesn't accept XLS/Excel files directly) or
create a link to an Excel XLS workbook and do an Append Query...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |