背景: 最近在看一些Python爬虫的相关知识,讲爬取的一些数据写入到Excel表中,当时当列的数目不确定的情况下,如何通过遍历的方式讲爬取的数据写入到Excel中. 开发环境: Python 3 openpyxl 解决方案:Excel列名其实就是一个26进制的数,我们只需要实现26进制和10进制之间的转换就行列 代码: def colname_to_num(colname): if type(colname) is not str: return colname col = 0 power
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.Regularexpression_rs; namespace Hooogle { public static class ExcelConvert { #region - 由数字转换为Excel中的列字母 - public static int ToIndex(string columnN
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.Regularexpression_rs; namespace Hooogle { public static class ExcelConvert { #region - 由数字转换为Excel中的列字母 - public static int ToIndex(string columnN