This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "app.py", line 31, in <module> | |
destbook.save("result.xls") | |
File "/Users/zach/Work/upload/pages/xlwt/Workbook.py", line 643, in save | |
doc.save(filename, self.get_biff_data()) | |
File "/Users/zach/Work/upload/pages/xlwt/Workbook.py", line 618, in get_biff_data | |
shared_str_table = self.__sst_rec() | |
File "/Users/zach/Work/upload/pages/xlwt/Workbook.py", line 580, in __sst_rec | |
return self.__sst.get_biff_record() | |
File "/Users/zach/Work/upload/pages/xlwt/BIFFRecords.py", line 77, in get_biff_record |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "app.py", line 13, in <module> | |
workbook.save("result.xls") | |
File "/Users/zach/Work/upload/pages/xlwt/Workbook.py", line 643, in save | |
doc.save(filename, self.get_biff_data()) | |
File "/Users/zach/Work/upload/pages/xlwt/Workbook.py", line 618, in get_biff_data | |
shared_str_table = self.__sst_rec() | |
File "/Users/zach/Work/upload/pages/xlwt/Workbook.py", line 580, in __sst_rec | |
return self.__sst.get_biff_record() | |
File "/Users/zach/Work/upload/pages/xlwt/BIFFRecords.py", line 77, in get_biff_record |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import xlwt | |
workbook = xlwt.Workbook(encoding='utf8') | |
worksheet = workbook.add_sheet("Sheet 1") | |
wrapstyle = xlwt.easyxf("alignment: wrap on") | |
for count, filename in enumerate(glob.glob("*.html")): | |
worksheet.row(count).write(0, filename[:-5]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="container"><div id="contents"><a name="top"><h3>Master Lock - No. 1KALF</h3></a><p><a id="contents-features" href="#features">Features</a></p><p><a id="contents-lockDimensions" href="#lockDimensions">Specifications</a></p><p><a id="contents-details" href="#details">Details</a></p><p><a id="contents-bestUsedFors" href="#bestUsedFors">Best Used For</a></p><p><a id="contents-faqs" href="#faqs">FAQs</a></p><p><a id="contents-testimonials" href="#testimonials">Testimonials</a></p><p><a id="contents-videos" href="#videos">Videos</a></p><hr/></div><div id="features"><a name="features"><h2 class="features">Features</h2></a><ul><li>Keyed Alike - order multiple locks to open with the same key or order to match other locks with the W1 cylinder</li><li>Commercial grade padlock features superior protection from drilling and prying</li><li>1-3/4" (44mm) wide laminated steel body for superior strength</li><li>1-1/2" (38mm) tall, 5/16" (8mm) diameter hardened steel shackle for superior cut resistance</li><li>Dual lo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I use excel to generate product upload files for Google's Merchant Center, Amazon's Seller Central, and in-house e-commerce solutions. | |
But it's the same type of data (i.e. products), and sometimes even the same data, just being pushed to different targets. | |
Maintaining these often half-duplicate xlsx files has become tedious and unwieldy, so I'm wondering if I should have a database of products that would allow me to generate a spreadsheet for each target (by performing certain queries on my more general data I'd assume). | |
Is this a legitimate time to use a database? | |
And, if so, should I use a relational database? I'm not too clear as to what kind of data is relational and what kind isn't, but I've read that traditionally relational databases are used in the corporate/e-commerce area. | |
But that could just be history rather than adeptness. | |
Anyway, just wondering. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Products | |
go | |
-- create test table | |
create table XMLTest(SKU int, Description nvarchar(30)) | |
go | |
-- edit | |
insert into XMLTest (SKU, Description) | |
select x.product.query('SKU').value('.', 'INT'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Version 1: | |
PRODUCTS | |
SKU | name | | |
01 |Hard Hat| | |
ATTRIBUTES | |
aID | name | | |
01 | color | | |
02 | closure| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 2 Tables: Products(SKU, ShippingWeight, Name, Description ...) and Weights(SKU, ShippingWeight) | |
select Products.SKU, Weights.ShippingWeight | |
from Products join Weights | |
on Products.SKU = Weights.SKU and Products.Vendor = 'MasterLock' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
var GoSquared = {}; | |
GoSquared.acct = "GSN-848662-J"; | |
(function(w){ | |
function gs(){ | |
w._gstc_lt = +new Date; | |
var d = document, g = d.createElement("script"); | |
g.type = "text/javascript"; | |
g.src = "//d1l6p2sc9645hc.cloudfront.net/tracker.js"; | |
var s = d.getElementsByTagName("script")[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Description: | |
Given a number n and two integers p1,p2 determine if the bits in position p1 and p2 are the same or not. Positions p1,p2 and 1 based. | |
Input sample: | |
The first argument will be a text file containing a comma separated list of 3 integers, one list per line. e.g. | |
86,2,3 | |
125,1,2 |