We were unable to open an Excel Workbook with ASP.net before creating a folder named «Desktop» in the systemprofile Folder.
The solution was to create a folder named «Desktop» in C:WindowsSysWOW64configsystemprofile
Error Message:
System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot access the file 'c:temptest.xls'.
There are several possible reasons:
- The file name or path does not exist.
- The file is being used by another program.
- The workbook you are trying to save has the same name as a currently open workbook.
Does any one know an explanation for this?
If found a tip here: Excel 2007 automation on top of a Windows Server 2008 x64
But I do not understand how this Desktop folder is related to Excel or InteropServices in general.
Version Information:
OS: Windows Server 2012
IIS: Internet Information Services (Version 8.0.9200.16384)
Excel: Excel 2013
Лист Excel на рабочем столе (типа актив десктоп) как сделать? |
|
Сохраните лист как Web-страницу, установив флажок «Добавить интерактивность», в свойствах десктопа выберите этот HTM. |
|
{quote}{login=Казанский}{date=20.11.2011 05:32}{thema=}{post}Сохраните лист как Web-страницу, установив флажок «Добавить интерактивность», в свойствах десктопа выберите этот HTM.{/post}{/quote} Спасибо за ответ! Нужно чтобы с этим документом можно было работать, а в этом случае так не получится. |
|
{quote}{login=Казанский}{date=20.11.2011 05:32}{thema=}{post}Сохраните лист как Web-страницу, установив флажок «Добавить интерактивность», в свойствах десктопа выберите этот HTM.{/post}{/quote} Как добавить интерактивность? При сохранении не нашел подобного. Office 2010 |
|
Kuzmich Пользователь Сообщений: 7998 |
Откройте папку Мой компьютер, Или на рабочем столе кликнете правой кнопкой мышки, |
Serge Пользователь Сообщений: 11308 |
|
> Как добавить интерактивность? При сохранении не нашел подобного. Office 2010 Да, начиная с 2007 из Офиса убрали ActiveX компонент «Microsoft Office Spreadsheet», который обеспечивает этот функционал. |
|
Serge Пользователь Сообщений: 11308 |
{quote}{login=Казанский}{date=20.11.2011 11:59}{thema=}{post}Да, начиная с 2007 из Офиса убрали ActiveX компонент «Microsoft Office Spreadsheet», который обеспечивает этот функционал. |
А так страница выглядит на рабочем столе. Формулы и значения я добавил уже на рабочем столе! |
|
> Т.е. никак? Не знаю, Серж. |
|
Serge Пользователь Сообщений: 11308 |
{quote}{login=Казанский}{date=21.11.2011 12:10}{thema=}{post}…есть ли опция «Добавить интерактивность» — завтра проверю!{/post}{/quote}В 2010 нет |
Юрий М Модератор Сообщений: 60585 Контакты см. в профиле |
А зачем это? В чём выигрыш? |
Serge Пользователь Сообщений: 11308 |
{quote}{login=Юрий М}{date=21.11.2011 12:29}{thema=}{post}А зачем это? В чём выигрыш?{/post}{/quote}Мне просто интересно знать про возможности Excel, а вот зачем это ТС — понятия не имею |
vikttur Пользователь Сообщений: 47199 |
Здесь он объясняет: http://programmersforum.ru/showthread.php?t=174449 Сюда зайти уже силы не хватило. Или чего-то другого. |
Юрий М Модератор Сообщений: 60585 Контакты см. в профиле |
Пробежался по ссылке — надуманная проблема: можно подумать, что переключаться с документа на рабочий стол (сворачивать документ) не нужно |
{quote}{login=Юрий М}{date=21.11.2011 01:49}{thema=}{post}И ведь нужно ВСЕ свернуть, чтобы увидеть рабочий стол. |
|
{quote}{login=vikttur}{date=21.11.2011 01:40}{thema=}{post}Сюда зайти уже силы не хватило. Или чего-то другого.{/post}{/quote} |
|
{quote}{login=vikttur}{date=21.11.2011 01:40}{thema=}{post}Сюда зайти….{/post}{/quote} |
|
{quote}{login=Казанский}{date=21.11.2011 12:04}{thema=}{post}А так страница выглядит на рабочем столе.{/post}{/quote} |
|
Serge Пользователь Сообщений: 11308 |
{quote}{login=Юрий М}{date=21.11.2011 01:49}{thema=}{post}Для Сержа — любителя работать исключительно с клавиатурой: свернуть все открытые — Windows+D :-){/post}{/quote}Юр, ты думаешь я не знаю? ЗЫ Что интересно, это сочетание работает без fn на ноуте. У кого ноутбук, тот поймёт |
Serge Пользователь Сообщений: 11308 |
{quote}{login=dance-saf}{date=21.11.2011 09:15}{thema=Re: }{post} |
Hugo Пользователь Сообщений: 23253 |
Для одной формулы можно скриптом vbs обойтись: Dim x Do |
В общем, вот что Excel 2000 генерирует. |
|
dance-saf Гость |
#25 22.11.2011 21:22:48 {quote}{login=Казанский}{date=22.11.2011 01:13}{thema=}{post}В общем, вот что Excel 2000 генерирует. Спасибо за идею/наводку! |
Your computer’s desktop is often the easiest and most convenient place to store files, especially those you use often. But the desktop is rarely Excel’s default working folder. Instead Excel usually saves to a directory labelled “My Documents” or to a folder within that directory. Fortunately, changing the saving location of a file is a snap in Excel.
-
Create or open your file. If this is a new file you’ve just created and are saving it for the first time, proceed to Step 2. If you’re re-saving an existing Excel document, navigate to its location on your computer and open it.
-
Launch the save file window. With your Excel file open, click “File” from the menu in the top left-hand corner of Excel. Then click “Save As.” If you’re using a Windows computer, you can also launch the Save File window by pressing the «Control» key and then the “S” key on your keyboard. If you’re using a Mac, press the «Command» key and then the “S” key.
-
Type the name of your file into the box beside the words “Save As” at the top of the Save File window.
-
Navigate to the Desktop folder in the Save File window. Below the box where you’ve entered the name of your file, you’ll see a series of folders, each of which represents a location on your computer. Click through the folders until you locate the one labelled “Desktop.” On a Mac, you’ll see it on the left-hand side of the Save File window under the heading “Places.” On a PC, its location varies depending on your version of Windows. If your current default working folder is My Documents, click the «Up one level» button until you reach the desktop.
-
Click the “Save” button in the bottom right-hand corner of the Save File window.
Please Note:
This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Finding the Path to the Desktop.
Written by Allen Wyatt (last updated July 11, 2020)
This tip applies to Excel 97, 2000, 2002, and 2003
Donald is writing a macro in which he needs to reference a user’s desktop. However, the path to the desktop necessarily varies from system to system and user to user. He wonders what coding he can use to determine the path to the desktop regardless of system.
There are several ways to find the path to the desktop in VBA. One way is to call the Windows scripting host, in this manner:
Function GetDesktop() As String Dim oWSHShell As Object Set oWSHShell = CreateObject("WScript.Shell") GetDesktop = oWSHShell.SpecialFolders("Desktop") Set oWSHShell = Nothing End Function
Note that this is a user-defined macro that you can use either from the worksheet or from another macro. The use from the worksheet would be as follows:
=GetDesktop()
Another way to determine the path to the desktop is to use the following line in your code:
sPath = Environ("USERPROFILE") & "Desktop"
If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I’ve prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.
ExcelTips is your source for cost-effective Microsoft Excel training.
This tip (8233) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Finding the Path to the Desktop.
Author Bio
With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. Learn more about Allen…
MORE FROM ALLEN
Understanding Sections
Sections are handy if you want to subdivide a document so you can apply different document formatting to those …
Discover More
Limiting Choices in a Cell
Want to limit what a person can enter into a particular cell? You can use Excel’s data validation feature to help enforce …
Discover More
Adding Page Borders to a Printout
Need a full-page border on your Excel printouts? It’s not as easy to get one as you might wish. There are a few ways you …
Discover More
More ExcelTips (menu)
Determining an ANSI Value in a Macro
Need to know the character code used for a particular character? In a macro you can use the Asc function to determine the …
Discover More
Determining Mouse Cursor Coordinates On a Graphic
Add a graphic to a worksheet as part of an Image object, and you can use some very handy event handlers to figure out the …
Discover More
Reversing Names In Place
Do you want a way to reverse names within a cell, making them «last, first» instead of «first last?» Here’s a handy macro …
Discover More
Нам не удалось открыть книгу Excel с ASP.net до создания папки с именем «Рабочий стол» в папке systemmprofile.
Решением было создать папку с именем «Рабочий стол» в C:WindowsSysWOW64configsystemprofile
Сообщение об ошибке:
System.Runtime.InteropServices.COMException (0x800A03EC): Microsoft Office Excel cannot access the file 'c:temptest.xls'.
Есть несколько возможных причин:
- Имя файла или путь не существует.
- Файл используется другой программой.
- Книга, которую вы пытаетесь сохранить, имеет то же имя, что и текущая открытая книга.
Кто-нибудь знает объяснение этому?
Если вы нашли совет здесь: автоматизация Excel 2007 поверх Windows Server 2008 x64
Но я не понимаю, как эта папка Desktop связана с Excel или InteropServices в целом.
Информация о версии:
ОС: Windows Server 2012
IIS: информационные службы Интернета (версия 8.0.9200.16384)
Excel: Excel 2013
2014-03-17 15:56