Папка desktop для excel

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
Регистрация: 21.12.2012

Откройте папку Мой компьютер,  
далее найдите свой файл Excel, где он у вас расположен  
и выделите его мышкой, правой кнопкой  
мышки выберите Отправить На рабочий стол(создать ярлык).  
На рабочем столе появится ваш файл.  

  Или на рабочем столе кликнете правой кнопкой мышки,  
далее создать ярлык и пропишите путь к вашему файлу.

 

Serge

Пользователь

Сообщений: 11308
Регистрация: 01.01.1970

 

> Как добавить интерактивность? При сохранении не нашел подобного. Office 2010  

  Да, начиная с 2007 из Офиса убрали ActiveX компонент «Microsoft Office Spreadsheet», который обеспечивает этот функционал.  
Так в Excel 2000 происходит добавление интерактивности:

 

Serge

Пользователь

Сообщений: 11308
Регистрация: 01.01.1970

{quote}{login=Казанский}{date=20.11.2011 11:59}{thema=}{post}Да, начиная с 2007 из Офиса убрали ActiveX компонент «Microsoft Office Spreadsheet», который обеспечивает этот функционал.  
{/post}{/quote}Т.е. никак?

 

А так страница выглядит на рабочем столе. Формулы и значения я добавил уже на рабочем столе!  
Вообще, этому действительно можно найти применение, например вычислять НДС, переводить футы в сантиметры и производить другие вычисления с константами (которые не надо вбивать каждый раз, как при работе с калькулятором).

 

> Т.е. никак?  

  Не знаю, Серж.  
На рабочем компе, где раньше стоял Офис 2000, а теперь 2007, компонент Spreadsheet остался. А вот есть ли опция «Добавить интерактивность» — завтра проверю!

 

Serge

Пользователь

Сообщений: 11308
Регистрация: 01.01.1970

{quote}{login=Казанский}{date=21.11.2011 12:10}{thema=}{post}…есть ли опция «Добавить интерактивность» — завтра проверю!{/post}{/quote}В 2010 нет :-(

 

Юрий М

Модератор

Сообщений: 60585
Регистрация: 14.09.2012

Контакты см. в профиле

А зачем это? В чём выигрыш?

 

Serge

Пользователь

Сообщений: 11308
Регистрация: 01.01.1970

{quote}{login=Юрий М}{date=21.11.2011 12:29}{thema=}{post}А зачем это? В чём выигрыш?{/post}{/quote}Мне просто интересно знать про возможности Excel, а вот зачем это ТС — понятия не имею :-)

 

vikttur

Пользователь

Сообщений: 47199
Регистрация: 15.09.2012

Здесь он объясняет:  

http://programmersforum.ru/showthread.php?t=174449  

Сюда зайти уже силы не хватило. Или чего-то другого.

 

Юрий М

Модератор

Сообщений: 60585
Регистрация: 14.09.2012

Контакты см. в профиле

Пробежался по ссылке — надуманная проблема: можно подумать, что переключаться с документа на рабочий стол (сворачивать документ) не нужно :-) А если открыто много документов? И ведь нужно ВСЕ свернуть, чтобы увидеть рабочий стол.  
P.S. Для Сержа — любителя работать исключительно с клавиатурой: свернуть все открытые — Windows+D :-)

 

{quote}{login=Юрий М}{date=21.11.2011 01:49}{thema=}{post}И ведь нужно ВСЕ свернуть, чтобы увидеть рабочий стол.  
{/post}{/quote}  
я использую два монитора (к компу подключил старенький LCD монитор).  
Да и на основном место почти всегда есть, так как разрешение 2560х1600

 

{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
Регистрация: 01.01.1970

{quote}{login=Юрий М}{date=21.11.2011 01:49}{thema=}{post}Для Сержа — любителя работать исключительно с клавиатурой: свернуть все открытые — Windows+D :-){/post}{/quote}Юр, ты думаешь я не знаю? ;-)  

  ЗЫ Что интересно, это сочетание работает без fn на ноуте. У кого ноутбук, тот поймёт :-)

 

Serge

Пользователь

Сообщений: 11308
Регистрация: 01.01.1970

{quote}{login=dance-saf}{date=21.11.2011 09:15}{thema=Re: }{post}  
Как Вы такое сделали? {/post}{/quote}Ставьте Excel версий до 2003 — и действуйте по совету Казанского: «Сохраните лист как Web-страницу, установив флажок «Добавить интерактивность», в свойствах десктопа выберите этот HTM.»

 

Hugo

Пользователь

Сообщений: 23253
Регистрация: 22.12.2012

Для одной формулы можно скриптом  vbs обойтись:  

     Dim x  

     Do  
       x = InputBox(«input x»)  
       If IsNumeric(x) Then  
           If Len(x) Then  
               MsgBox x * 2  
           End If  
       Else  
           MsgBox «Not a string!!!»  
           x = 1  
       End If  
   Loop While x

 

В общем, вот что Excel 2000 генерирует.  
У меня на десктопе рабочего компа с Офисом 2007 работает, но, повторюсь, на компе остались Office Web Components с Офиса 2000.

 

dance-saf

Гость

#25

22.11.2011 21:22:48

{quote}{login=Казанский}{date=22.11.2011 01:13}{thema=}{post}В общем, вот что Excel 2000 генерирует.  
У меня на десктопе рабочего компа с Офисом 2007 работает, но, повторюсь, на компе остались Office Web Components с Офиса 2000.{/post}{/quote}  

  Спасибо за идею/наводку!

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.

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

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

  3. Type the name of your file into the box beside the words “Save As” at the top of the Save File window.

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

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

Понравилась статья? Поделить с друзьями:
  • Панихида записка бланк word
  • Панельные данные пример excel
  • Панель языка в word
  • Панель элементов управления word
  • Панель элементов управления excel