arraywidget.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:larray-editor 作者: larray-project 项目源码 文件源码
def to_excel(self):
        """View selection in Excel"""
        if xw is None:
            QMessageBox.critical(self, "Error", "to_excel() is not available because xlwings is not installed")
        data = self._selection_data()
        if data is None:
            return
        # convert (row) generators to lists then array
        # TODO: the conversion to array is currently necessary even though xlwings will translate it back to a list
        #       anyway. The problem is that our lists contains numpy types and especially np.str_ crashes xlwings.
        #       unsure how we should fix this properly: in xlwings, or change _selection_data to return only standard
        #       Python types.
        xw.view(np.array([list(r) for r in data]))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号