前期在“PowerBI之家”微信公众号和PBIHome论坛免费发布了“微软新一代Excel Power BI联合处理模式1.02”版模板,有许多用户反映为何必须要保存到桌面,这一步如果能解决将会更友好。
本文将对该问题进行解决,方案如下:
“新一代Excel Power BI 联合数据处理模式(桌面精简版)PBIHome论坛出品v1.02”的.xltx(Excel模板)和.xlsx两版本的处理模式相同。
问题的关键于端口号的获取,之前要求保存到桌面,是为了获取本机路径:

获取本机本地计算机路径
该路径与系统盘和计算机命名有关,每台电脑都不同。因此1.02版本用的是手工保存文件到桌面后用CELL函数提取本机路径。因此1.02版本原则上适用于所有windows系统。唯一的不方便是每次都需要将xlsx保存在制定位置、或者用xltx模板新建后保存桌面。
其实考虑到每台计算机的本地路径是固定的,可以将模板针对每台计算机进行改进,将路径固定为本机路径。
具体代码修改如下:







购买过刘凯老师课程,尚未获取模板用户,可直接跟刘凯老师索取。其他用户可关注“PowerBI之家”微信公众号留下邮箱索取。
网友评论