首页 \ 问答 \ 如何通过C#WPF隐藏Excel工作表中的网格线(How to hide gridlines in an excel sheet through C# WPF)

如何通过C#WPF隐藏Excel工作表中的网格线(How to hide gridlines in an excel sheet through C# WPF)

按照此

http://www.e-iceblue.com/Tutorials/Spire.XLS/Spire.XLS-Program-Guide/Worksheet/How-to-hide-or-show-gridlines-on-a-worksheet-in-C.html

隐藏网格线我应该做的只是:

Workbook wb = app.Workbooks.Add(XlWBATemplate.xlWBATWorksheet);
  Worksheet ws = wb.Worksheets[1];
   ws.GridLinesVisible = false;<----WRONG

但那是错的。

还有解决方案

如何使用open xml C#在Excel中禁用网格线?

不起作用。 那么任何其他方法?

先谢谢你。 帕特里克


Following this

http://www.e-iceblue.com/Tutorials/Spire.XLS/Spire.XLS-Program-Guide/Worksheet/How-to-hide-or-show-gridlines-on-a-worksheet-in-C.html

to hide gridlines I should do just:

Workbook wb = app.Workbooks.Add(XlWBATemplate.xlWBATWorksheet);
  Worksheet ws = wb.Worksheets[1];
   ws.GridLinesVisible = false;<----WRONG

but that is wrong.

And also the solution here

How to disable gridlines in Excel using open xml C#?

does not work. So any other method?

thank you in advance. PAtrick


原文:https://stackoverflow.com/questions/35244751
更新时间:2022-01-03 13:01

最满意答案

对于要退出的活动,您可以调用finish()


Using finish() seemed to be working on the emulator after I called expire(); from the onCreate and not on button Click. However using System.exit(0) on a real device did help while as finish() did not.

System.exit() (In pure and core Java) can be used to run shutdown hooks before the program quits. This is a convenient way to handle shutdown in bigger programs, where all parts of the program can't (and shouldn't) be aware of each other. Then, if someone wants to quit, he can simply call System.exit(), and the shutdown hooks (if properly set up) take care of doing all necessary shutdown ceremonies such as closing files, releasing resources.

While as in case of finish() The method that called finish() will run to completion. The finish() operation will not even begin until you return control to Android.

相关问答

更多
  • 对于要退出的活动,您可以调用finish() 。 Using finish() seemed to be working on the emulator after I called expire(); from the onCreate and not on button Click. However using System.exit(0) on a real device did help while as finish() did not. System.exit() (In pure and co ...
  • 把will_end放在第一位, started第二位started : SELECT DATEDIFF('2009-12-24', '2009-12-17') --- 7 另外,从您的字段名称中删除单引号: SELECT DATEDIFF(will_end, started) AS Duration FROM my_table WHERE id = 110 ,或用反引号替换它们: SELECT DATEDIFF(`will_end`, `started`) AS `Duratio ...
  • 您可以使用mysql date_diff()作为日期http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_datediff 但由于你使用时间戳,间隔是一个很好的解决方案: b.ts> unix_timestamp(CURDATE() - INTERVAL 7天) You could use mysql date_diff() for dates http://dev.mysql.com/doc/refman/ ...
  • library(lubridate) start_date <- as.Date("2017-06-15") end_date <- as.Date("2018-06-14") current_month<- as.Date("2017-06-01") rent_days_in_month = function(start_date, end_date, current_month){ if(month(current_month) == month(start_date) & year(curren ...
  • 这个gem是* nix实用程序cron的包装器。 我们可以在gem源文件command_line.rb第75行中看到它使用'crontab'hell命令。 它不适用于标准Windows安装,因为此命令不可用。 有一些Windows版本,如cronw ,但我不能说这些是否与每当宝石兼容。 或者,您可以将长时间运行的任务作为Windows服务运行。 这篇文章应该让你入门。 如果您必须使用/ cron,可能是因为您正在部署* nix,请尝试下载Binami Rubystack VM - 您将在几分钟内启动并运行。 ...
  • 在application / config中 更改: $config['index_page'] = 'index.php'; 至: $config['index_page'] = ''; In application/config Change: $config['index_page'] = 'index.php'; to: $config['index_page'] = '';
  • 很可能您的Outlook组件服务未运行 跑 Start -> run -> dcomcnfg.exe 看它是否存在 如果MAPI.Session可用,您还需要检查Windows注册表 Start -> Run -> HKEY_CLASSES_ROOT -> Outlook.Application -> MAPI.Session 如果找不到,请使用本教程 http://www.digiways.com/articles/php/outlook/ 例 set_time_limit(10); i ...
  • 首先使用时间函数获取Currant时间戳,然后检查它是否已过期 例如 $ currunt_timestamp = time(); $ membership_expire =“”; if (($currunt_timestamp - $membership_expire) < 600) // (600 = 60*10 seconds = 10 minutes) { echo "No Expired"; } else { echo "expired"; } First get the Cu ...
  • 使用此公式: =NETWORKDAYS(A1,INDEX(A1:E1,AGGREGATE(15,6,COLUMN(B1:E1)/(B1:E1<>""),1))) INDEX / AGGREGATE将在B:E中找到非空的第一个单元格,并将其作为结束日期返回NETWORKDAYS。 =IF(A1<>"",NETWORKDAYS(A1, B1), IF(C1<>"", NETWORKDAYS(A1, C1))) This does the trick, I could not get AGGREGATE/IND ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)