久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Excel 錯(cuò)誤 HRESULT: 0x800A03EC 嘗試使用單元格名稱獲

Excel error HRESULT: 0x800A03EC while trying to get range with cell#39;s name(Excel 錯(cuò)誤 HRESULT: 0x800A03EC 嘗試使用單元格名稱獲取范圍)
本文介紹了Excel 錯(cuò)誤 HRESULT: 0x800A03EC 嘗試使用單元格名稱獲取范圍的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我正在使用 Window Service 項(xiàng)目.必須按順序?qū)?shù)據(jù)寫入 Excel 文件中的工作表.

I am working with Window Service project. that have to write data to a sheet in Excel file in a sequence times.

但有時(shí),只是有時(shí),服務(wù)在嘗試使用單元格名稱獲取范圍時(shí)拋出異常Exception from HRESULT: 0x800A03EC".

But sometimes, just sometimes, the service throw out the exception "Exception from HRESULT: 0x800A03EC" while it's trying to get range with cell's name.

我已經(jīng)把打開excel表格的代碼放在這里了.

I have put the code of opening excel sheet, and getting cell here.

  • 操作系統(tǒng):window server 2003 Office:
  • Microsoft Office 2003 sp2

1:打開excel表格

1: Opening excel sheet

m_WorkBook = m_WorkBooks.Open(this.FilePath, 0, false, 5,
     "", "", true, Excels.XlPlatform.xlWindows, ";",
     true, false, 0, true, 0, 0);

2:讓單元格寫入

protected object m_MissingValue = System.Reflection.Missing.Value;
Range range = m_WorkSheet.get_Range(cell.CellName, m_MissingValue);
// error from this method, and cell name is string.

推薦答案

錯(cuò)誤碼0x800A03EC(或-2146827284)表示NAME_NOT_FOUND;換句話說,你已經(jīng)要求了一些東西,而 Excel 找不到它.

The error code 0x800A03EC (or -2146827284) means NAME_NOT_FOUND; in other words, you've asked for something, and Excel can't find it.

這是一個(gè)通用代碼,它可以應(yīng)用于很多它找不到的東西,例如.當(dāng) PivotItem 未應(yīng)用過濾器時(shí),使用當(dāng)時(shí)無效的屬性(如 PivotItem.SourceNameStandard)會拋出此錯(cuò)誤.Worksheets["BLAHBLAH"] 在工作表不存在等情況下會拋出此錯(cuò)誤.通常,您要求的是具有特定名稱且不存在的內(nèi)容.至于為什么,這需要你自己去挖掘.

This is a generic code, which can apply to lots of things it can't find e.g. using properties which aren't valid at that time like PivotItem.SourceNameStandard throws this when a PivotItem doesn't have a filter applied. Worksheets["BLAHBLAH"] throws this, when the sheet doesn't exist etc. In general, you are asking for something with a specific name and it doesn't exist. As for why, that will taking some digging on your part.

檢查您的工作表是否確實(shí)有您要求的范圍,或者 .CellName 肯定會返回您要求的范圍的名稱.

Check your sheet definitely does have the Range you are asking for, or that the .CellName is definitely giving back the name of the range you are asking for.

這篇關(guān)于Excel 錯(cuò)誤 HRESULT: 0x800A03EC 嘗試使用單元格名稱獲取范圍的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執(zhí)行 Excel NORMINV 函數(shù)的 C# 庫?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權(quán)列表中選擇 x 個(gè)隨機(jī)元素(無需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創(chuàng)建時(shí)間表的摘要描述)
C# Normal Random Number(C# 普通隨機(jī)數(shù))
Standard deviation of generic list?(通用列表的標(biāo)準(zhǔn)偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創(chuàng)建一個(gè) IAwaitable 的類)
主站蜘蛛池模板: 免费一区二区三区在线视频 | 91麻豆精品国产91久久久资源速度 | 欧美日韩成人网 | 亚洲欧洲成人av每日更新 | 在线播放一区 | 日一区二区 | 亚洲va国产日韩欧美精品色婷婷 | 国产美女一区 | 女人牲交视频一级毛片 | 国内精品久久久久久 | 夜夜艹天天干 | 亚洲国产成人久久综合一区,久久久国产99 | 久久综合九色综合欧美狠狠 | 国产精品第2页 | 婷婷久久综合 | 久久综合狠狠综合久久综合88 | 久久久久久久久久久爱 | 国产成人免费视频网站视频社区 | 狠狠伊人 | av片在线免费看 | 成人av电影天堂 | 色综合久久天天综合网 | 亚洲精品一区中文字幕乱码 | 成人精品一区二区三区中文字幕 | 成人免费在线视频 | a在线免费观看视频 | 最近日韩中文字幕 | 中文在线播放 | 国产精品毛片 | 成人久久18免费网站 | 亚洲国产欧美一区 | www.国产一区 | 久久极品 | 成人妇女免费播放久久久 | 天天操天天玩 | 黄色一级毛片免费看 | 国产精品福利视频 | 国产高清精品在线 | 精品美女 | 中文字幕成人网 | 一级黄片一级毛片 |